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
Modifier and TypeClassDescriptionstatic class
static interface
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Http2PipelineInitializer.BuilderSupplier
protected static final org.apache.logging.log4j.Logger
-
Constructor Summary
ConstructorDescriptionHttp2PipelineInitializer
(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 boolean
canCreateStream
(io.netty.channel.Channel channel) protected void
configurePipeline
(io.netty.channel.ChannelHandlerContext ctx, String protocol) protected io.netty.handler.codec.http2.Http2ChannelDuplexHandler
createHttp2MultiplexHandler
(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 int
protected void
logInitializingHttp1
(io.netty.channel.ChannelHandlerContext ctx) protected void
logInitializingHttp2
(io.netty.channel.ChannelHandlerContext ctx) protected io.netty.handler.codec.http2.Http2FrameCodecBuilder
writeTimeoutSeconds
(int writeTimeoutSeconds) Methods inherited from class io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
exceptionCaught, handshakeFailure, userEventTriggered
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
configurePipeline
in 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)
-