Search in sources :

Example 1 with ControllerInspector

use of core.framework.impl.web.ControllerInspector in project core-ng-project by neowu.

the class ModuleContext method route.

public void route(HTTPMethod method, String path, Controller controller, boolean skipInterceptor) {
    new PathPatternValidator(path).validate();
    ControllerInspector inspector = new ControllerInspector(controller);
    new ControllerClassValidator(inspector.targetClass, inspector.targetMethod).validate();
    String action = "http:" + ASCII.toLowerCase(method.name()) + ":" + path;
    httpServer.handler.route.add(method, path, new ControllerHolder(controller, inspector.targetMethod, inspector.controllerInfo, action, skipInterceptor));
}
Also used : ControllerClassValidator(core.framework.impl.web.ControllerClassValidator) PathPatternValidator(core.framework.impl.web.route.PathPatternValidator) ControllerHolder(core.framework.impl.web.ControllerHolder) ControllerInspector(core.framework.impl.web.ControllerInspector)

Aggregations

ControllerClassValidator (core.framework.impl.web.ControllerClassValidator)1 ControllerHolder (core.framework.impl.web.ControllerHolder)1 ControllerInspector (core.framework.impl.web.ControllerInspector)1 PathPatternValidator (core.framework.impl.web.route.PathPatternValidator)1