private OpenListener createAlpnOpenListener() { OptionMap undertowOptions = OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap(); ByteBufferPool bufferPool = getBufferPool().getValue(); HttpOpenListener http = new HttpOpenListener(bufferPool, undertowOptions); AlpnOpenListener alpn = new AlpnOpenListener(bufferPool, undertowOptions, http); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { Http2OpenListener http2 = new Http2OpenListener(bufferPool, undertowOptions, "h2"); alpn.addProtocol(Http2OpenListener.HTTP2, http2, 10); Http2OpenListener http2_14 = new Http2OpenListener(bufferPool, undertowOptions, "h2-14"); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2_14, 9); } return alpn; }
@Override public SSLEngine apply(SSLEngine engine) { if (!engineSupportsHTTP2(engine)) { if (!alpnFailLogged) { synchronized (this) {
public AlpnOpenListener(ByteBufferPool bufferPool, OptionMap undertowOptions, String fallbackProtocol, DelegateOpenListener fallbackListener) { this.bufferPool = bufferPool; this.undertowOptions = undertowOptions; this.fallbackProtocol = fallbackProtocol; statisticsEnabled = undertowOptions.get(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, false); if (fallbackProtocol != null && fallbackListener != null) { addProtocol(fallbackProtocol, fallbackListener, 0); } }
public AlpnOpenListener(ByteBufferPool bufferPool, OptionMap undertowOptions, String fallbackProtocol, DelegateOpenListener fallbackListener) { this.bufferPool = bufferPool; this.undertowOptions = undertowOptions; this.fallbackProtocol = fallbackProtocol; statisticsEnabled = undertowOptions.get(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, false); if (fallbackProtocol != null && fallbackListener != null) { addProtocol(fallbackProtocol, fallbackListener, 0); } }
AlpnOpenListener alpn = new AlpnOpenListener(buffers, undertowOptions, httpOpenListener); Http2OpenListener http2Listener = new Http2OpenListener(buffers, undertowOptions); http2Listener.setRootHandler(rootHandler); alpn.addProtocol(Http2OpenListener.HTTP2, http2Listener, 10); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2Listener, 7); openListener = alpn; } else {
public AlpnOpenListener(ByteBufferPool bufferPool, OptionMap undertowOptions, String fallbackProtocol, DelegateOpenListener fallbackListener) { this.bufferPool = bufferPool; this.undertowOptions = undertowOptions; this.fallbackProtocol = fallbackProtocol; statisticsEnabled = undertowOptions.get(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, false); if (fallbackProtocol != null && fallbackListener != null) { addProtocol(fallbackProtocol, fallbackListener, 0); } }
@Override public SSLEngine apply(SSLEngine engine) { if (!engineSupportsHTTP2(engine)) { if (!alpnFailLogged) { synchronized (this) {
private OpenListener createAlpnOpenListener() { OptionMap undertowOptions = OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap(); ByteBufferPool bufferPool = getBufferPool().getValue(); HttpOpenListener http = new HttpOpenListener(bufferPool, undertowOptions); AlpnOpenListener alpn = new AlpnOpenListener(bufferPool, undertowOptions, http); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { Http2OpenListener http2 = new Http2OpenListener(bufferPool, undertowOptions, "h2"); alpn.addProtocol(Http2OpenListener.HTTP2, http2, 10); Http2OpenListener http2_14 = new Http2OpenListener(bufferPool, undertowOptions, "h2-14"); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2_14, 9); } return alpn; }
@Override public SSLEngine apply(SSLEngine engine) { if (!engineSupportsHTTP2(engine)) { if (!alpnFailLogged) { synchronized (this) {
private OpenListener createAlpnOpenListener() { OptionMap undertowOptions = OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap(); ByteBufferPool bufferPool = getBufferPool().getValue(); HttpOpenListener http = new HttpOpenListener(bufferPool, undertowOptions); AlpnOpenListener alpn = new AlpnOpenListener(bufferPool, undertowOptions, http); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { Http2OpenListener http2 = new Http2OpenListener(bufferPool, undertowOptions, "h2"); alpn.addProtocol(Http2OpenListener.HTTP2, http2, 10); Http2OpenListener http2_14 = new Http2OpenListener(bufferPool, undertowOptions, "h2-14"); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2_14, 9); } return alpn; }
AlpnOpenListener alpn = new AlpnOpenListener(buffers, undertowOptions, httpOpenListener); Http2OpenListener http2Listener = new Http2OpenListener(buffers, undertowOptions); http2Listener.setRootHandler(rootHandler); alpn.addProtocol(Http2OpenListener.HTTP2, http2Listener, 10); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2Listener, 7); openListener = alpn; } else {
AlpnOpenListener alpn = new AlpnOpenListener(buffers, undertowOptions, httpOpenListener); Http2OpenListener http2Listener = new Http2OpenListener(buffers, undertowOptions); http2Listener.setRootHandler(rootHandler); alpn.addProtocol(Http2OpenListener.HTTP2, http2Listener, 10); alpn.addProtocol(Http2OpenListener.HTTP2_14, http2Listener, 7); openListener = alpn; } else {