private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
private void configureHttp2(final Connection connection, final String supportedProtocol) { if (HTTP2.equals(supportedProtocol)) { // If HTTP2 is supported - initialize HTTP2 connection // Create HTTP2 connection and bind it to the Grizzly connection final Http2Session http2Session = filter.createHttp2Session(connection, true); // we expect client preface http2Session.getHttp2State().setDirectUpgradePhase(); // !!! DON'T SEND PREFACE HERE // SSL connection (handshake) is not established yet and if we try // to send preface here SSLBaseFilter will try to flush it right away, // because it doesn't queue the output data like SSLFilter. // http2Session.enableHttp2Output(); // http2Session.sendPreface(); } }
@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(); } }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }
private Http2State doDirectUpgrade(final FilterChainContext ctx) { final Connection connection = ctx.getConnection(); final Http2Session http2Session = new Http2Session(connection, true, this); // Create HTTP/2.0 connection for the given Grizzly Connection final Http2State http2State = Http2State.create(connection); http2State.setHttp2Session(http2Session); http2State.setDirectUpgradePhase(); http2Session.setupFilterChains(ctx, true); // server preface http2Session.sendPreface(); return http2State; }