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 Classes Modifier and Type Class Description static class
Http2PipelineInitializer.Builder<T extends Http2PipelineInitializer.Builder<T>>
static interface
Http2PipelineInitializer.BuilderSupplier
-
Field Summary
Fields Modifier and Type Field Description static Http2PipelineInitializer.BuilderSupplier
DEFAULT_BUILDER
protected static org.apache.logging.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description Http2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, java.util.function.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, java.util.function.Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, boolean useCustomMultiplexHandler)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Http2PipelineInitializer.BuilderSupplier
builderOf(java.lang.Class<? extends Http2PipelineInitializer> clazz)
protected boolean
canCreateStream(io.netty.channel.Channel channel)
protected void
configurePipeline(io.netty.channel.ChannelHandlerContext ctx, java.lang.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
getWriteTimeoutSeconds()
protected void
logInitializingHttp1(io.netty.channel.ChannelHandlerContext ctx)
protected void
logInitializingHttp2(io.netty.channel.ChannelHandlerContext ctx)
protected io.netty.handler.codec.http2.Http2FrameCodecBuilder
serverHttp2FrameCodecBuilder()
Http2PipelineInitializer
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
-
-
-
-
Field Detail
-
LOG
protected static final org.apache.logging.log4j.Logger LOG
-
DEFAULT_BUILDER
public static final Http2PipelineInitializer.BuilderSupplier DEFAULT_BUILDER
-
-
Constructor Detail
-
Http2PipelineInitializer
@Deprecated public Http2PipelineInitializer(io.netty.handler.codec.http2.Http2Settings http2Settings, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, java.util.function.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, java.util.function.Consumer<io.netty.channel.ChannelPipeline> existingHttpPipelineInitializer, int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders)
-
-
Method Detail
-
writeTimeoutSeconds
@Nonnull public Http2PipelineInitializer writeTimeoutSeconds(@Nonnegative int 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, java.lang.String protocol) throws java.lang.Exception
- Specified by:
configurePipeline
in classio.netty.handler.ssl.ApplicationProtocolNegotiationHandler
- Throws:
java.lang.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(java.lang.Class<? extends Http2PipelineInitializer> clazz)
-
-