Package io.undertow.server.protocol.http2

Examples of io.undertow.server.protocol.http2.Http2ReceiveListener


                    .set(Options.BALANCING_TOKENS, 1)
                    .set(Options.BALANCING_CONNECTIONS, 2)
                    .getMap();

            ByteBufferSlicePool pool = new ByteBufferSlicePool(BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR, 2 * BUFFER_SIZE, 100 * BUFFER_SIZE);
            openListener = new Http2OpenListener(pool, OptionMap.create(UndertowOptions.ENABLE_SPDY, true));
            acceptListener = ChannelListeners.openListenerAdapter(new AlpnOpenListener(pool).addProtocol(Http2OpenListener.HTTP2, (io.undertow.server.DelegateOpenListener) openListener, 10));

            SSLContext serverContext = Http2TestRunner.getServerSslContext();
            XnioSsl xnioSsl = new JsseXnioSsl(xnio, OptionMap.EMPTY, serverContext);
            server = xnioSsl.createSslConnectionServer(worker, new InetSocketAddress(TestEnvironment.getHost(), TestEnvironment.getPort()), acceptListener, serverOptions);
View Full Code Here


                                SpdyOpenListener spdyListener = new SpdyOpenListener(buffers, new ByteBufferSlicePool(BufferAllocator.BYTE_BUFFER_ALLOCATOR, 1024, 1024), undertowOptions);
                                spdyListener.setRootHandler(rootHandler);
                                alpn.addProtocol(SpdyOpenListener.SPDY_3_1, spdyListener, 5);
                            }
                            if(http2) {
                                Http2OpenListener http2Listener = new Http2OpenListener(buffers, undertowOptions);
                                Http2OpenListener http214Listener = new Http2OpenListener(buffers, undertowOptions, Http2OpenListener.HTTP2_14);
                                http2Listener.setRootHandler(rootHandler);
                                http214Listener.setRootHandler(rootHandler);
                                alpn.addProtocol(Http2OpenListener.HTTP2, http2Listener, 10);
                                alpn.addProtocol(Http2OpenListener.HTTP2_14, http214Listener, 11);
                            }
                            openListener = alpn;
                        } else {
View Full Code Here

                    proxyOpenListener.setRootHandler(proxyHandler);
                    proxyServer.resumeAccepts();


                } else if (h2 && isAlpnEnabled()) {
                    openListener = new Http2OpenListener(new DebuggingSlicePool(new ByteBufferSlicePool(BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR, 2* BUFFER_SIZE, 100 * BUFFER_SIZE)), OptionMap.create(UndertowOptions.ENABLE_HTTP2, true, UndertowOptions.HTTP2_SETTINGS_ENABLE_PUSH, false));
                    acceptListener = ChannelListeners.openListenerAdapter(wrapOpenListener(new AlpnOpenListener(pool).addProtocol(Http2OpenListener.HTTP2, (io.undertow.server.DelegateOpenListener) openListener, 10)));

                    SSLContext serverContext = createSSLContext(loadKeyStore(SERVER_KEY_STORE), loadKeyStore(SERVER_TRUST_STORE));
                    SSLContext clientContext = createSSLContext(loadKeyStore(CLIENT_KEY_STORE), loadKeyStore(CLIENT_TRUST_STORE));
                    XnioSsl xnioSsl = new JsseXnioSsl(xnio, OptionMap.EMPTY, serverContext);
View Full Code Here

                    .set(Options.REUSE_ADDRESSES, true)
                    .set(Options.BALANCING_TOKENS, 1)
                    .set(Options.BALANCING_CONNECTIONS, 2)
                    .getMap();

            openListener = new Http2OpenListener(new ByteBufferSlicePool(BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR, 2 * BUFFER_SIZE, 100 * BUFFER_SIZE), OptionMap.create(UndertowOptions.ENABLE_SPDY, true));
            acceptListener = ChannelListeners.openListenerAdapter(openListener);

            SSLContext serverContext = Http2TestRunner.getServerSslContext();
            XnioSsl xnioSsl = new JsseXnioSsl(xnio, OptionMap.EMPTY, serverContext);
            server = xnioSsl.createSslConnectionServer(worker, new InetSocketAddress(TestEnvironment.getHost(), TestEnvironment.getPort()), acceptListener, serverOptions);
View Full Code Here

                    .set(Options.REUSE_ADDRESSES, true)
                    .set(Options.BALANCING_TOKENS, 1)
                    .set(Options.BALANCING_CONNECTIONS, 2)
                    .getMap();

            openListener = new Http2OpenListener(new ByteBufferSlicePool(BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR, 2 * BUFFER_SIZE, 100 * BUFFER_SIZE), OptionMap.create(UndertowOptions.ENABLE_SPDY, true), BUFFER_SIZE);
            acceptListener = ChannelListeners.openListenerAdapter(openListener);

            SSLContext serverContext = Http2TestRunner.getServerSslContext();
            XnioSsl xnioSsl = new JsseXnioSsl(xnio, OptionMap.EMPTY, serverContext);
            server = xnioSsl.createSslConnectionServer(worker, new InetSocketAddress(TestEnvironment.getHost(), TestEnvironment.getPort()), acceptListener, serverOptions);
View Full Code Here

                        proxyServer.resumeAccepts();
                    }

                }
                if(h2c) {
                    openListener.setRootHandler(new Http2UpgradeHandler(rootHandler));
                } else {
                    openListener.setRootHandler(rootHandler);
                }
                server.resumeAccepts();
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of io.undertow.server.protocol.http2.Http2ReceiveListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.