Class BasicServerChannelInitializer<C extends io.netty.channel.Channel,FACTORY extends BasicServerChannelInitializer<C,FACTORY>>
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
com.linkedin.alpini.netty4.handlers.ChannelInitializer<C>
com.linkedin.alpini.netty4.handlers.BasicServerChannelInitializer<C,FACTORY>
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
Router4PipelineFactory
public class BasicServerChannelInitializer<C extends io.netty.channel.Channel,FACTORY extends BasicServerChannelInitializer<C,FACTORY>>
extends ChannelInitializer<C>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ActiveStreamsCountHandlerprotected final Http2SettingsFrameLogger -
Constructor Summary
ConstructorsConstructorDescriptionBasicServerChannelInitializer(ConnectionLimitHandler connectionLimit, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, io.netty.util.Timer idleTimer, BooleanSupplier shutdownFlag, AsyncFullHttpRequestHandler.RequestHandler handler) BasicServerChannelInitializer(ConnectionLimitHandler connectionLimit, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, io.netty.util.Timer idleTimer, BooleanSupplier shutdownFlag, BooleanSupplier busyAutoReadDisable, AsyncFullHttpRequestHandler.RequestHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterHttpServerCodec(io.netty.channel.ChannelPipeline pipeline) protected voidbeforeChunkAggregator(io.netty.channel.ChannelPipeline pipeline) protected voidbeforeHttpRequestHandler(io.netty.channel.ChannelPipeline pipeline) protected voidbeforeHttpServerCodec(io.netty.channel.ChannelPipeline pipeline) protected voidbeforeIdleStateHandler(io.netty.channel.ChannelPipeline pipeline) protected Http2PipelineInitializerenableInboundHttp2(boolean enableHttp2) protected final FACTORYfactory()protected Http2PipelineInitializer.BuilderSupplierprotected final intprotected final intprotected final intprotected io.netty.handler.codec.http2.Http2SettingshandshakeConnectionTimeoutMillis(long idleConnectionTimeoutMillis) http2HeaderTableSize(int http2HeaderTableSize) http2InitialWindowSize(int http2InitialWindowSize) http2MaxConcurrentStreams(int maxConcurrentStreams) http2MaxFrameSize(int http2MaxFrameSize) http2MaxHeaderListSize(int http2MaxHeaderListSize) idleConnectionTimeoutMillis(long idleConnectionTimeoutMillis) protected voidinitChannel(C ch) This method will be called once theChannelwas registered.protected final booleanDeprecated.protected final booleanmaxChunkSize(int maxChunkSize) maxContentLength(long maxContentLength) maxHeaderSize(int maxHeaderSize) maxInitialLineLength(int maxInitialLineLength) useCustomMultiplexHandler(boolean useCustomMultiplexHandler) Deprecated.Methods inherited from class com.linkedin.alpini.netty4.handlers.ChannelInitializer
channelRegistered, currentContext, exceptionCaught, handlerAdded, handlerRemovedMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
_activeStreamsCountHandler
-
_http2SettingsFrameLogger
-
-
Constructor Details
-
BasicServerChannelInitializer
public BasicServerChannelInitializer(@Nonnull ConnectionLimitHandler connectionLimit, @Nonnull ActiveStreamsCountHandler activeStreamsCountHandler, @Nonnull Http2SettingsFrameLogger http2SettingsFrameLogger, @Nonnull io.netty.util.Timer idleTimer, @Nonnull BooleanSupplier shutdownFlag, @Nonnull AsyncFullHttpRequestHandler.RequestHandler handler) -
BasicServerChannelInitializer
public BasicServerChannelInitializer(@Nonnull ConnectionLimitHandler connectionLimit, @Nonnull ActiveStreamsCountHandler activeStreamsCountHandler, @Nonnull Http2SettingsFrameLogger http2SettingsFrameLogger, @Nonnull io.netty.util.Timer idleTimer, @Nonnull BooleanSupplier shutdownFlag, @Nonnull BooleanSupplier busyAutoReadDisable, @Nonnull AsyncFullHttpRequestHandler.RequestHandler handler)
-
-
Method Details
-
factory
-
maxInitialLineLength
-
maxHeaderSize
-
maxChunkSize
-
maxContentLength
-
idleConnectionTimeoutMillis
-
handshakeConnectionTimeoutMillis
-
http2MaxConcurrentStreams
-
http2MaxFrameSize
-
http2InitialWindowSize
-
http2HeaderTableSize
-
http2MaxHeaderListSize
-
enableInboundHttp2
-
useCustomMultiplexHandler
Deprecated. -
getMaxInitialLineLength
protected final int getMaxInitialLineLength() -
getMaxHeaderSize
protected final int getMaxHeaderSize() -
getMaxChunkSize
protected final int getMaxChunkSize() -
isValidateHeaders
protected final boolean isValidateHeaders() -
isUseCustomMultiplexHandler
Deprecated. -
initChannel
This method will be called once theChannelwas registered. After the method returns this instance will be removed from theChannelPipelineof theChannel.- Specified by:
initChannelin classChannelInitializer<C extends io.netty.channel.Channel>- Parameters:
ch- theChannelwhich was registered.- Throws:
Exception- is thrown if an error occurs. In that case it will be handled byChannelInitializer.exceptionCaught(io.netty.channel.ChannelHandlerContext, Throwable)which will by default close theChannel.
-
getHttp2PipelineInitializerBuilderSupplier
-
createHttp2PipelineInitializer
-
getServerHttp2Settings
protected io.netty.handler.codec.http2.Http2Settings getServerHttp2Settings() -
afterHttpServerCodec
protected void afterHttpServerCodec(io.netty.channel.ChannelPipeline pipeline) -
beforeHttpServerCodec
protected void beforeHttpServerCodec(@Nonnull io.netty.channel.ChannelPipeline pipeline) -
beforeChunkAggregator
protected void beforeChunkAggregator(@Nonnull io.netty.channel.ChannelPipeline pipeline) -
beforeIdleStateHandler
protected void beforeIdleStateHandler(@Nonnull io.netty.channel.ChannelPipeline pipeline) -
beforeHttpRequestHandler
protected void beforeHttpRequestHandler(@Nonnull io.netty.channel.ChannelPipeline pipeline)
-