}
@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));
}