Package com.linkedin.alpini.netty4.http2
Class Http2PipelineInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
com.linkedin.alpini.netty4.http2.Http2PipelineInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class Http2PipelineInitializer
extends io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
Initializes HTTP/2 Pipeline.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Http2PipelineInitializer.BuilderSupplierprotected static final org.apache.logging.log4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionHttp2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders) Http2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, boolean useCustomMultiplexHandler) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuilderOf(Class<? extends Http2PipelineInitializer> clazz) protected booleancanCreateStream(io.netty.channel.Channel channel) protected voidconfigurePipeline(io.netty.channel.ChannelHandlerContext ctx, String protocol) protected io.netty.handler.codec.http2.Http2ChannelDuplexHandlercreateHttp2MultiplexHandler(io.netty.channel.ChannelHandler inboundStreamHandler) protected io.netty.handler.codec.MessageToMessageCodec<io.netty.handler.codec.http2.Http2StreamFrame,io.netty.handler.codec.http.HttpObject> createHttp2StreamFrameToHttpObjectCodec(boolean validateHeaders) protected intprotected voidlogInitializingHttp1(io.netty.channel.ChannelHandlerContext ctx) protected voidlogInitializingHttp2(io.netty.channel.ChannelHandlerContext ctx) protected io.netty.handler.codec.http2.Http2FrameCodecBuilderwriteTimeoutSeconds(int writeTimeoutSeconds) Methods inherited from class io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
exceptionCaught, handshakeFailure, userEventTriggeredMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOG
protected static final org.apache.logging.log4j.Logger LOG -
DEFAULT_BUILDER
-
-
Constructor Details
-
Http2PipelineInitializer
@Deprecated public Http2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, boolean useCustomMultiplexHandler) Deprecated. -
Http2PipelineInitializer
public Http2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders)
-
-
Method Details
-
writeTimeoutSeconds
-
getWriteTimeoutSeconds
protected int getWriteTimeoutSeconds() -
canCreateStream
protected boolean canCreateStream(io.netty.channel.Channel channel) -
serverHttp2FrameCodecBuilder
protected io.netty.handler.codec.http2.Http2FrameCodecBuilder serverHttp2FrameCodecBuilder() -
configurePipeline
protected void configurePipeline(io.netty.channel.ChannelHandlerContext ctx, String protocol) throws Exception - Specified by:
configurePipelinein classio.netty.handler.ssl.ApplicationProtocolNegotiationHandler- Throws:
Exception
-
createHttp2MultiplexHandler
@Nonnull protected io.netty.handler.codec.http2.Http2ChannelDuplexHandler createHttp2MultiplexHandler(@Nonnull io.netty.channel.ChannelHandler inboundStreamHandler) -
createHttp2StreamFrameToHttpObjectCodec
@Nonnull protected io.netty.handler.codec.MessageToMessageCodec<io.netty.handler.codec.http2.Http2StreamFrame,io.netty.handler.codec.http.HttpObject> createHttp2StreamFrameToHttpObjectCodec(boolean validateHeaders) -
logInitializingHttp1
protected void logInitializingHttp1(io.netty.channel.ChannelHandlerContext ctx) -
logInitializingHttp2
protected void logInitializingHttp2(io.netty.channel.ChannelHandlerContext ctx) -
builderOf
public static Http2PipelineInitializer.BuilderSupplier builderOf(Class<? extends Http2PipelineInitializer> clazz)
-