@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String[] getProtocols(final SSLEngine sslEngine) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn getProtocols. Connection={0}, protocols={1}", new Object[]{AlpnSupport.getConnection(sslEngine), Arrays.toString(SUPPORTED_PROTOCOLS)}); } return SUPPORTED_PROTOCOLS.clone(); }
@Override public String selectProtocol(SSLEngine sslEngine, String[] clientProtocols) { final Connection connection = AlpnSupport.getConnection(sslEngine); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn selectProtocol. Connection={0} sslEngine={1} clientProtocols={2}", new Object[]{connection, sslEngine, Arrays.toString(clientProtocols)}); } for (String supportedProtocol : SUPPORTED_PROTOCOLS) { for (String clientProtocol : clientProtocols) { if (supportedProtocol.equals(clientProtocol)) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn select {0}", clientProtocol); } configureHttp2(connection, clientProtocol); return clientProtocol; } } } // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); return null; }
@Override public String selectProtocol(SSLEngine sslEngine, String[] clientProtocols) { final Connection connection = AlpnSupport.getConnection(sslEngine); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn selectProtocol. Connection={0} sslEngine={1} clientProtocols={2}", new Object[]{connection, sslEngine, Arrays.toString(clientProtocols)}); } for (String supportedProtocol : SUPPORTED_PROTOCOLS) { for (String clientProtocol : clientProtocols) { if (supportedProtocol.equals(clientProtocol)) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn select {0}", clientProtocol); } configureHttp2(connection, clientProtocol); return clientProtocol; } } } // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); return null; }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }
@Override public void protocolSelected(final SSLEngine sslEngine, final String selectedProtocol) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Alpn protocolSelected. Connection={0}, protocol={1}", new Object[]{AlpnSupport.getConnection(sslEngine), selectedProtocol}); } final Connection connection = AlpnSupport.getConnection(sslEngine); if (HTTP2.equals(selectedProtocol)) { final Http2Session http2Session = filter.createClientHttp2Session(connection); // we expect preface http2Session.getHttp2State().setDirectUpgradePhase(); http2Session.sendPreface(); } else { // Never try HTTP2 for this connection Http2State.create(connection).setNeverHttp2(); } }