Search in sources :

Example 6 with HttpFrontendManager

use of org.webpieces.frontend2.api.HttpFrontendManager in project webpieces by deanhiller.

the class AbstractHttp1Test method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    MockTcpServerChannel svrChannel = new MockTcpServerChannel();
    mockChanMgr.addTCPSvrChannelToReturn(svrChannel);
    mockChannel.setIncomingFrameDefaultReturnValue(CompletableFuture.completedFuture(mockChannel));
    mockListener.setDefaultRetVal(mockStreamWriter);
    mockStreamWriter.setDefaultRetValToThis();
    Http2Config config = new Http2Config();
    config.setLocalSettings(localSettings);
    InjectionConfig injConfig = new InjectionConfig(mockTime, config);
    FrontendConfig frontendConfig = new FrontendConfig("http", new InetSocketAddress("me", 8080));
    HttpFrontendManager manager = HttpFrontendFactory.createFrontEnd(mockChanMgr, mockTimer, injConfig);
    HttpServer httpServer = manager.createHttpServer(frontendConfig, mockListener);
    httpServer.start();
    simulateClientConnecting();
}
Also used : FrontendConfig(org.webpieces.frontend2.api.FrontendConfig) HttpFrontendManager(org.webpieces.frontend2.api.HttpFrontendManager) InetSocketAddress(java.net.InetSocketAddress) Http2Config(com.webpieces.http2engine.api.client.Http2Config) HttpServer(org.webpieces.frontend2.api.HttpServer) InjectionConfig(com.webpieces.http2engine.api.client.InjectionConfig) MockTcpServerChannel(org.webpieces.httpfrontend2.api.mock2.MockTcpServerChannel) Before(org.junit.Before)

Aggregations

Http2Config (com.webpieces.http2engine.api.client.Http2Config)4 InjectionConfig (com.webpieces.http2engine.api.client.InjectionConfig)4 InetSocketAddress (java.net.InetSocketAddress)4 FrontendConfig (org.webpieces.frontend2.api.FrontendConfig)4 HttpFrontendManager (org.webpieces.frontend2.api.HttpFrontendManager)4 HttpServer (org.webpieces.frontend2.api.HttpServer)4 Before (org.junit.Before)3 MockTcpServerChannel (org.webpieces.httpfrontend2.api.mock2.MockTcpServerChannel)3 Http2ServerEngineFactory (com.webpieces.http2engine.api.server.Http2ServerEngineFactory)2 AsyncServerManager (org.webpieces.asyncserver.api.AsyncServerManager)2 FrontEndServerManagerImpl (org.webpieces.frontend2.impl.FrontEndServerManagerImpl)2 NamedThreadFactory (org.webpieces.util.threading.NamedThreadFactory)2 HpackParser (com.webpieces.hpack.api.HpackParser)1 TimeImpl (com.webpieces.util.time.TimeImpl)1 Executor (java.util.concurrent.Executor)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)1 BufferCreationPool (org.webpieces.data.api.BufferCreationPool)1 HttpParser (org.webpieces.httpparser.api.HttpParser)1 ChannelManager (org.webpieces.nio.api.ChannelManager)1