Search in sources :

Example 1 with DContentTypeRouter

use of org.webpieces.router.impl.routers.DContentTypeRouter in project webpieces by deanhiller.

the class AllContentTypesBuilderImpl method buildRouter.

public CRouter buildRouter() {
    DScopedRouter router = leftOverDomainsBuilder.buildRouter();
    Map<String, DContentTypeRouter> domainToRouter = new HashMap<>();
    for (Entry<String, ContentTypeBuilderImpl> entry : domainToRouteBuilder.entrySet()) {
        DContentTypeRouter router2 = entry.getValue().buildRouter();
        domainToRouter.put(entry.getKey(), router2);
    }
    return new CRouter(router, domainToRouter);
}
Also used : HashMap(java.util.HashMap) DContentTypeRouter(org.webpieces.router.impl.routers.DContentTypeRouter) DScopedRouter(org.webpieces.router.impl.routers.DScopedRouter) CRouter(org.webpieces.router.impl.routers.CRouter)

Aggregations

HashMap (java.util.HashMap)1 CRouter (org.webpieces.router.impl.routers.CRouter)1 DContentTypeRouter (org.webpieces.router.impl.routers.DContentTypeRouter)1 DScopedRouter (org.webpieces.router.impl.routers.DScopedRouter)1