/** * Iterate over all registered controllers to get the first suitable one. * @param jsonPath built JsonPath object mad from request path * @param requestType type of a HTTP request * @return suitable controller */ public BaseController getController(JsonPath jsonPath, String requestType) { for (BaseController controller : controllers) { if (controller.isAcceptable(jsonPath, requestType)) { return controller; } } throw new MethodNotFoundException(PathBuilder.buildPath(jsonPath), requestType); } }
JsonPath jsonPath = new PathBuilder(resourceRegistry).buildPath(getRequestPath(request));
JsonPath jsonPath = new PathBuilder(resourceRegistry).buildPath(invokerContext.getRequestPath());
ResourceRegistry resourceRegistry = boot.getResourceRegistry(); RequestDispatcher requestDispatcher = boot.getRequestDispatcher(); JsonPath jsonPath = new PathBuilder(resourceRegistry).buildPath(invokerContext.getRequestPath());