use of org.webpieces.router.impl.routers.FStreamingRouter in project webpieces by deanhiller.
the class ScopedRouteBuilderImpl method addStreamRoute.
@Override
public void addStreamRoute(Port port, HttpMethod method, String path, String controllerMethod, RouteId routeId) {
UrlPath p = new UrlPath(routerInfo, path);
RouteModuleInfo moduleInfo = CurrentRoutes.get();
RouteInfo routeInfo = new RouteInfo(moduleInfo, controllerMethod);
// MUST DO loadControllerIntoMeta HERE so stack trace has customer's line in it so he knows EXACTLY what
// he did wrong when reading the exception!!
MethodMetaAndController container = holder.getFinder().loadGenericController(resettingLogic.getInjector(), routeInfo);
MatchInfo matchInfo = createMatchInfo(p, port, method, holder.getUrlEncoding());
FStreamingRouter router = new FStreamingRouter(holder.getRouteInvoker2(), container.getLoadedController(), moduleInfo.getI18nBundleName(), matchInfo);
SvcProxyForContent svc = new SvcProxyForContent(holder.getSvcProxyLogic(), futureUtil);
RouterAndInfo routerAndInfo = new RouterAndInfo(router, routeInfo, container, svc);
newDynamicRoutes.add(routerAndInfo);
if (// if there is a routeId, then add the reverse mapping
routeId != null)
resettingLogic.getReverseRoutes().addRoute(routeId, router);
log.info("scope:'" + routerInfo + "' added content route=" + matchInfo + " method=" + routeInfo.getControllerMethodString());
}
Aggregations