Package netflix.karyon.transport.http.KaryonHttpModule

Examples of netflix.karyon.transport.http.KaryonHttpModule.HttpServerConfig


    }

    @SuppressWarnings("rawtypes")
    @Inject
    public void setInjector(Injector injector) {
        HttpServerConfig config = (HttpServerConfig) injector.getInstance(serverConfigKey);

        RequestHandler router = injector.getInstance(routerKey);

        GovernatorHttpInterceptorSupport<I, O> interceptorSupport = injector.getInstance(interceptorSupportKey);
        interceptorSupport.finish(injector);
        HttpRequestHandler<I, O> httpRequestHandler = new HttpRequestHandler<I, O>(router, interceptorSupport);

        HttpServerBuilder<I, O> builder = KaryonTransport.newHttpServerBuilder(config.getPort(), httpRequestHandler);

        if (config.requiresThreadPool()) {
            builder.withRequestProcessingThreads(config.getThreadPoolSize());
        }

        if (injector.getExistingBinding(pipelineConfiguratorKey) != null) {
            builder.appendPipelineConfigurator(injector.getInstance(pipelineConfiguratorKey));
        }
View Full Code Here

TOP

Related Classes of netflix.karyon.transport.http.KaryonHttpModule.HttpServerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.