Search in sources :

Example 6 with RawHTTP2ServerConnectionFactory

use of org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory in project jetty.project by eclipse.

the class FlowControlStrategyTest method start.

protected void start(ServerSessionListener listener) throws Exception {
    QueuedThreadPool serverExecutor = new QueuedThreadPool();
    serverExecutor.setName("server");
    server = new Server(serverExecutor);
    RawHTTP2ServerConnectionFactory connectionFactory = new RawHTTP2ServerConnectionFactory(new HttpConfiguration(), listener);
    connectionFactory.setFlowControlStrategyFactory(FlowControlStrategyTest.this::newFlowControlStrategy);
    connector = new ServerConnector(server, connectionFactory);
    server.addConnector(connector);
    server.start();
    client = new HTTP2Client();
    QueuedThreadPool clientExecutor = new QueuedThreadPool();
    clientExecutor.setName("client");
    client.setExecutor(clientExecutor);
    client.setFlowControlStrategyFactory(FlowControlStrategyTest.this::newFlowControlStrategy);
    client.start();
}
Also used : ServerConnector(org.eclipse.jetty.server.ServerConnector) RawHTTP2ServerConnectionFactory(org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory) Server(org.eclipse.jetty.server.Server) QueuedThreadPool(org.eclipse.jetty.util.thread.QueuedThreadPool) HttpConfiguration(org.eclipse.jetty.server.HttpConfiguration)

Aggregations

RawHTTP2ServerConnectionFactory (org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory)6 HttpConfiguration (org.eclipse.jetty.server.HttpConfiguration)6 QueuedThreadPool (org.eclipse.jetty.util.thread.QueuedThreadPool)4 Server (org.eclipse.jetty.server.Server)3 ServerConnector (org.eclipse.jetty.server.ServerConnector)3 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 HashMap (java.util.HashMap)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 HttpClient (org.eclipse.jetty.client.HttpClient)1 HttpDestination (org.eclipse.jetty.client.HttpDestination)1 ContentResponse (org.eclipse.jetty.client.api.ContentResponse)1 HttpFields (org.eclipse.jetty.http.HttpFields)1 MetaData (org.eclipse.jetty.http.MetaData)1 HTTP2Session (org.eclipse.jetty.http2.HTTP2Session)1 Session (org.eclipse.jetty.http2.api.Session)1