Search in sources :

Example 1 with PortConfigLookupImpl

use of org.webpieces.webserver.impl.PortConfigLookupImpl in project webpieces by deanhiller.

the class WebServerFactory method getModules.

private static Module getModules(WebServerConfig config, RouterConfig routerConfig, TemplateConfig templateConfig, Arguments args) {
    // Special wiring needed between webserver and router due to order of start.  See
    // PortConfigLookupImpl javadoc for more info
    PortConfigLookupImpl portLookup = new PortConfigLookupImpl();
    boolean hasCoreModule = config.getCoreModule() != null;
    Module m = Modules.combine(new WebServerModule(config, portLookup, hasCoreModule, args), new ProdRouterModule(routerConfig, portLookup), new ProdTemplateModule(templateConfig));
    if (config.getCoreModule() != null)
        m = Modules.combine(m, config.getCoreModule());
    return m;
}
Also used : PortConfigLookupImpl(org.webpieces.webserver.impl.PortConfigLookupImpl) ProdRouterModule(org.webpieces.router.api.ProdRouterModule) WebServerModule(org.webpieces.webserver.impl.WebServerModule) Module(com.google.inject.Module) WebServerModule(org.webpieces.webserver.impl.WebServerModule) ProdTemplateModule(org.webpieces.templating.api.ProdTemplateModule) ProdRouterModule(org.webpieces.router.api.ProdRouterModule) ProdTemplateModule(org.webpieces.templating.api.ProdTemplateModule)

Aggregations

Module (com.google.inject.Module)1 ProdRouterModule (org.webpieces.router.api.ProdRouterModule)1 ProdTemplateModule (org.webpieces.templating.api.ProdTemplateModule)1 PortConfigLookupImpl (org.webpieces.webserver.impl.PortConfigLookupImpl)1 WebServerModule (org.webpieces.webserver.impl.WebServerModule)1