Search in sources :

Example 1 with RawHTTP2ServerConnectionFactory

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

the class AbstractTest method start.

protected void start(ServerSessionListener listener) throws Exception {
    prepareServer(new RawHTTP2ServerConnectionFactory(new HttpConfiguration(), listener));
    server.start();
    prepareClient();
    client.start();
}
Also used : RawHTTP2ServerConnectionFactory(org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory) HttpConfiguration(org.eclipse.jetty.server.HttpConfiguration)

Example 2 with RawHTTP2ServerConnectionFactory

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

the class RawHTTP2ProxyTest method startServer.

private Server startServer(String name, ServerSessionListener listener) throws Exception {
    QueuedThreadPool serverExecutor = new QueuedThreadPool();
    serverExecutor.setName(name);
    Server server = new Server(serverExecutor);
    RawHTTP2ServerConnectionFactory connectionFactory = new RawHTTP2ServerConnectionFactory(new HttpConfiguration(), listener);
    ServerConnector connector = new ServerConnector(server, 1, 1, connectionFactory);
    server.addConnector(connector);
    server.setAttribute("connector", connector);
    servers.add(server);
    server.start();
    return server;
}
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)

Example 3 with RawHTTP2ServerConnectionFactory

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

the class FlowControlStalledTest method start.

protected void start(FlowControlStrategy.Factory flowControlFactory, ServerSessionListener listener) throws Exception {
    QueuedThreadPool serverExecutor = new QueuedThreadPool();
    serverExecutor.setName("server");
    server = new Server(serverExecutor);
    RawHTTP2ServerConnectionFactory connectionFactory = new RawHTTP2ServerConnectionFactory(new HttpConfiguration(), listener);
    connectionFactory.setFlowControlStrategyFactory(flowControlFactory);
    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(flowControlFactory);
    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)

Example 4 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)

Example 5 with RawHTTP2ServerConnectionFactory

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

the class AbstractTest method start.

protected void start(ServerSessionListener listener) throws Exception {
    prepareServer(new RawHTTP2ServerConnectionFactory(new HttpConfiguration(), listener));
    server.start();
    prepareClient();
    client.start();
}
Also used : RawHTTP2ServerConnectionFactory(org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory) 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