private Http2ConnectionHandler newHttp2ConnectionHandler(final ChannelPipeline p) { DefaultHttp2Connection connection = new DefaultHttp2Connection(true); InboundHttp2ToHttpAdapter listener = new InboundHttp2ToHttpAdapterBuilder(connection) .propagateSettings(false) .validateHttpHeaders(false) .maxContentLength(maxContentLength) .build(); HttpToHttp2ConnectionHandler http2handler = new HttpToHttp2ConnectionHandlerBuilder() .frameListener(listener) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG)) .connection(connection) .build(); return http2handler; }
h2HandlerBuilder.frameLogger(new Http2FrameLogger(LogLevel.DEBUG, HttpClient.class));
h2HandlerBuilder.frameLogger(new Http2FrameLogger(LogLevel.DEBUG, HttpClient.class));
private Http2ConnectionHandler newHttp2ConnectionHandler(final ChannelPipeline p) { DefaultHttp2Connection connection = new DefaultHttp2Connection(true); InboundHttp2ToHttpAdapter listener = new InboundHttp2ToHttpAdapterBuilder(connection) .propagateSettings(false) .validateHttpHeaders(false) .maxContentLength(maxContentLength) .build(); HttpToHttp2ConnectionHandler http2handler = new HttpToHttp2ConnectionHandlerBuilder() .frameListener(listener) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG)) .connection(connection) .build(); return http2handler; }
@Override public void handlerAdded(ChannelHandlerContext ctx) throws Exception { LOGGER.info("{} : handlerAdded", connectionInfo); Http2Connection connection = new DefaultHttp2Connection(true); ChannelHandler http2ConnHandler = new HttpToHttp2ConnectionHandlerBuilder() .frameListener(new DelegatingDecompressorFrameListener( connection, new InboundHttp2ToHttpAdapterBuilder(connection) .maxContentLength(master.config().getMaxContentLength()) .propagateSettings(true) .build())) .connection(connection) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG)) .build(); ctx.pipeline() .addBefore(ctx.name(), null, http2ConnHandler) .addBefore(ctx.name(), null, new Http2Handler()); }
@Override public void handlerAdded(ChannelHandlerContext ctx) throws Exception { LOGGER.info("{} : handlerAdded", connectionInfo); Http2Connection connection = new DefaultHttp2Connection(false); ChannelHandler http2ConnHandler = new HttpToHttp2ConnectionHandlerBuilder() .frameListener(new DelegatingDecompressorFrameListener( connection, new InboundHttp2ToHttpAdapterBuilder(connection) .maxContentLength(master.config().getMaxContentLength()) .propagateSettings(true) .build())) .frameLogger(new Http2FrameLogger(LogLevel.DEBUG)) .connection(connection) .build(); ctx.pipeline() .addBefore(ctx.name(), null, http2ConnHandler) .addBefore(ctx.name(), null, new Http2Handler()); }
@Override public void initChannel(SocketChannel ch) throws Exception { final Http2Connection connection = new DefaultHttp2Connection(false); connectionHandler = new HttpToHttp2ConnectionHandlerBuilder() .frameListener(new DelegatingDecompressorFrameListener( connection, new InboundHttp2ToHttpAdapterBuilder(connection) .maxContentLength(maxContentLength) .propagateSettings(true) .build())) .frameLogger(logger) .connection(connection) .build(); responseHandler = new Http2ResponseHandler(); settingsHandler = new Http2SettingsHandler(ch.newPromise()); if (sslCtx != null) { configureSsl(ch); } else { configureClearText(ch); } }