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>
-
-
Field Summary
Fields Modifier and Type Field Description protected ActiveStreamsCountHandler_activeStreamsCountHandlerprotected Http2SettingsFrameLogger_http2SettingsFrameLogger
-
Constructor Summary
Constructors Constructor Description BasicServerChannelInitializer(ConnectionLimitHandler connectionLimit, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, io.netty.util.Timer idleTimer, java.util.function.BooleanSupplier shutdownFlag, AsyncFullHttpRequestHandler.RequestHandler handler)BasicServerChannelInitializer(ConnectionLimitHandler connectionLimit, ActiveStreamsCountHandler activeStreamsCountHandler, Http2SettingsFrameLogger http2SettingsFrameLogger, io.netty.util.Timer idleTimer, java.util.function.BooleanSupplier shutdownFlag, java.util.function.BooleanSupplier busyAutoReadDisable, AsyncFullHttpRequestHandler.RequestHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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 Http2PipelineInitializercreateHttp2PipelineInitializer()FACTORYenableInboundHttp2(boolean enableHttp2)protected FACTORYfactory()protected Http2PipelineInitializer.BuilderSuppliergetHttp2PipelineInitializerBuilderSupplier()protected intgetMaxChunkSize()protected intgetMaxHeaderSize()protected intgetMaxInitialLineLength()protected io.netty.handler.codec.http2.Http2SettingsgetServerHttp2Settings()FACTORYhandshakeConnectionTimeoutMillis(long idleConnectionTimeoutMillis)FACTORYhttp2HeaderTableSize(int http2HeaderTableSize)FACTORYhttp2InitialWindowSize(int http2InitialWindowSize)FACTORYhttp2MaxConcurrentStreams(int maxConcurrentStreams)FACTORYhttp2MaxFrameSize(int http2MaxFrameSize)FACTORYhttp2MaxHeaderListSize(int http2MaxHeaderListSize)FACTORYidleConnectionTimeoutMillis(long idleConnectionTimeoutMillis)protected voidinitChannel(C ch)This method will be called once theChannelwas registered.protected booleanisUseCustomMultiplexHandler()Deprecated.protected booleanisValidateHeaders()FACTORYmaxChunkSize(int maxChunkSize)FACTORYmaxContentLength(long maxContentLength)FACTORYmaxHeaderSize(int maxHeaderSize)FACTORYmaxInitialLineLength(int maxInitialLineLength)FACTORYuseCustomMultiplexHandler(boolean useCustomMultiplexHandler)Deprecated.-
Methods inherited from class com.linkedin.alpini.netty4.handlers.ChannelInitializer
channelRegistered, currentContext, exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Field Detail
-
_activeStreamsCountHandler
protected final ActiveStreamsCountHandler _activeStreamsCountHandler
-
_http2SettingsFrameLogger
protected final Http2SettingsFrameLogger _http2SettingsFrameLogger
-
-
Constructor Detail
-
BasicServerChannelInitializer
public BasicServerChannelInitializer(@Nonnull ConnectionLimitHandler connectionLimit, @Nonnull ActiveStreamsCountHandler activeStreamsCountHandler, @Nonnull Http2SettingsFrameLogger http2SettingsFrameLogger, @Nonnull io.netty.util.Timer idleTimer, @Nonnull java.util.function.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 java.util.function.BooleanSupplier shutdownFlag, @Nonnull java.util.function.BooleanSupplier busyAutoReadDisable, @Nonnull AsyncFullHttpRequestHandler.RequestHandler handler)
-
-
Method Detail
-
factory
protected final FACTORY factory()
-
maxInitialLineLength
public FACTORY maxInitialLineLength(int maxInitialLineLength)
-
maxHeaderSize
public FACTORY maxHeaderSize(int maxHeaderSize)
-
maxChunkSize
public FACTORY maxChunkSize(int maxChunkSize)
-
maxContentLength
public FACTORY maxContentLength(long maxContentLength)
-
idleConnectionTimeoutMillis
public FACTORY idleConnectionTimeoutMillis(long idleConnectionTimeoutMillis)
-
handshakeConnectionTimeoutMillis
public FACTORY handshakeConnectionTimeoutMillis(long idleConnectionTimeoutMillis)
-
http2MaxConcurrentStreams
public FACTORY http2MaxConcurrentStreams(int maxConcurrentStreams)
-
http2MaxFrameSize
public FACTORY http2MaxFrameSize(int http2MaxFrameSize)
-
http2InitialWindowSize
public FACTORY http2InitialWindowSize(int http2InitialWindowSize)
-
http2HeaderTableSize
public FACTORY http2HeaderTableSize(int http2HeaderTableSize)
-
http2MaxHeaderListSize
public FACTORY http2MaxHeaderListSize(int http2MaxHeaderListSize)
-
enableInboundHttp2
public FACTORY enableInboundHttp2(boolean enableHttp2)
-
useCustomMultiplexHandler
@Deprecated public FACTORY useCustomMultiplexHandler(boolean useCustomMultiplexHandler)
Deprecated.
-
getMaxInitialLineLength
protected final int getMaxInitialLineLength()
-
getMaxHeaderSize
protected final int getMaxHeaderSize()
-
getMaxChunkSize
protected final int getMaxChunkSize()
-
isValidateHeaders
protected final boolean isValidateHeaders()
-
isUseCustomMultiplexHandler
@Deprecated protected final boolean isUseCustomMultiplexHandler()
Deprecated.
-
initChannel
protected void initChannel(C ch) throws java.lang.Exception
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:
java.lang.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
protected Http2PipelineInitializer.BuilderSupplier getHttp2PipelineInitializerBuilderSupplier()
-
createHttp2PipelineInitializer
protected Http2PipelineInitializer 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)
-
-