use of com.webpieces.http2engine.api.server.Http2ServerEngineFactory in project webpieces by deanhiller.
the class HttpFrontendFactory method createFrontEnd.
/**
* @param id Use for logging and also file recording names
* use the SessionExecutorImpl found in webpieces
* @param metrics
*
* @return
*/
public static HttpFrontendManager createFrontEnd(String id, ScheduledExecutorService timer, BufferPool pool, FrontendMgrConfig config, MeterRegistry metrics) {
Executor executor = Executors.newFixedThreadPool(config.getThreadPoolSize(), new NamedThreadFactory(id));
MetricsCreator.monitor(metrics, executor, id);
ChannelManagerFactory factory = ChannelManagerFactory.createFactory(metrics);
ChannelManager chanMgr = factory.createMultiThreadedChanMgr(id, pool, config.getBackpressureConfig(), executor);
AsyncServerManager svrMgr = AsyncServerMgrFactory.createAsyncServer(chanMgr, metrics);
HttpParser httpParser = HttpParserFactory.createParser(id, metrics, pool);
HpackParser http2Parser = HpackParserFactory.createParser(pool, true);
InjectionConfig injConfig = new InjectionConfig(http2Parser, new TimeImpl(), config.getHttp2Config());
Http2ServerEngineFactory svrEngineFactory = new Http2ServerEngineFactory(injConfig);
return new FrontEndServerManagerImpl(svrMgr, timer, svrEngineFactory, httpParser);
}
use of com.webpieces.http2engine.api.server.Http2ServerEngineFactory in project webpieces by deanhiller.
the class HttpFrontendFactory method createFrontEnd.
/**
*
* @param id Use for logging and also file recording names
* @param threadPoolSize The size of the threadpool, although all data comes in order as we
* use the SessionExecutorImpl found in webpieces
*
* @return
*/
public static HttpFrontendManager createFrontEnd(String id, int threadPoolSize, ScheduledExecutorService timer, BufferPool pool) {
Executor executor = Executors.newFixedThreadPool(threadPoolSize, new NamedThreadFactory(id));
ChannelManagerFactory factory = ChannelManagerFactory.createFactory();
ChannelManager chanMgr = factory.createMultiThreadedChanMgr(id, pool, executor);
AsyncServerManager svrMgr = AsyncServerMgrFactory.createAsyncServer(chanMgr);
HttpParser httpParser = HttpParserFactory.createParser(pool);
HpackParser http2Parser = HpackParserFactory.createParser(pool, true);
InjectionConfig injConfig = new InjectionConfig(http2Parser, new TimeImpl(), new Http2Config());
Http2ServerEngineFactory svrEngineFactory = new Http2ServerEngineFactory(injConfig);
return new FrontEndServerManagerImpl(svrMgr, timer, svrEngineFactory, httpParser);
}
use of com.webpieces.http2engine.api.server.Http2ServerEngineFactory in project webpieces by deanhiller.
the class HttpFrontendFactory method createFrontEnd.
public static HttpFrontendManager createFrontEnd(ChannelManager chanMgr, ScheduledExecutorService timer, InjectionConfig injConfig, HttpParser parsing) {
AsyncServerManager svrMgr = AsyncServerMgrFactory.createAsyncServer(chanMgr);
Http2ServerEngineFactory svrEngineFactory = new Http2ServerEngineFactory(injConfig);
return new FrontEndServerManagerImpl(svrMgr, timer, svrEngineFactory, parsing);
}
use of com.webpieces.http2engine.api.server.Http2ServerEngineFactory in project webpieces by deanhiller.
the class HttpFrontendFactory method createFrontEnd.
public static HttpFrontendManager createFrontEnd(ChannelManager chanMgr, ScheduledExecutorService timer, InjectionConfig injConfig, HttpParser parsing, MeterRegistry metrics) {
AsyncServerManager svrMgr = AsyncServerMgrFactory.createAsyncServer(chanMgr, metrics);
Http2ServerEngineFactory svrEngineFactory = new Http2ServerEngineFactory(injConfig);
return new FrontEndServerManagerImpl(svrMgr, timer, svrEngineFactory, parsing);
}
use of com.webpieces.http2engine.api.server.Http2ServerEngineFactory in project webpieces by deanhiller.
the class HttpFrontendFactory method createFrontEnd.
public static HttpFrontendManager createFrontEnd(AsyncServerManager svrMgr, BufferPool pool, Http2Config http2Config, MeterRegistry metrics) {
ScheduledExecutorService timer = Executors.newSingleThreadScheduledExecutor();
HttpParser httpParser = HttpParserFactory.createParser(svrMgr.getName(), metrics, pool);
HpackParser http2Parser = HpackParserFactory.createParser(pool, true);
InjectionConfig injConfig = new InjectionConfig(http2Parser, new TimeImpl(), http2Config);
Http2ServerEngineFactory svrEngineFactory = new Http2ServerEngineFactory(injConfig);
return new FrontEndServerManagerImpl(svrMgr, timer, svrEngineFactory, httpParser);
}
Aggregations