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
_activeStreamsCountHandler
protected 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 void
afterHttpServerCodec(io.netty.channel.ChannelPipeline pipeline)
protected void
beforeChunkAggregator(io.netty.channel.ChannelPipeline pipeline)
protected void
beforeHttpRequestHandler(io.netty.channel.ChannelPipeline pipeline)
protected void
beforeHttpServerCodec(io.netty.channel.ChannelPipeline pipeline)
protected void
beforeIdleStateHandler(io.netty.channel.ChannelPipeline pipeline)
protected Http2PipelineInitializer
createHttp2PipelineInitializer()
FACTORY
enableInboundHttp2(boolean enableHttp2)
protected FACTORY
factory()
protected Http2PipelineInitializer.BuilderSupplier
getHttp2PipelineInitializerBuilderSupplier()
protected int
getMaxChunkSize()
protected int
getMaxHeaderSize()
protected int
getMaxInitialLineLength()
protected io.netty.handler.codec.http2.Http2Settings
getServerHttp2Settings()
FACTORY
handshakeConnectionTimeoutMillis(long idleConnectionTimeoutMillis)
FACTORY
http2HeaderTableSize(int http2HeaderTableSize)
FACTORY
http2InitialWindowSize(int http2InitialWindowSize)
FACTORY
http2MaxConcurrentStreams(int maxConcurrentStreams)
FACTORY
http2MaxFrameSize(int http2MaxFrameSize)
FACTORY
http2MaxHeaderListSize(int http2MaxHeaderListSize)
FACTORY
idleConnectionTimeoutMillis(long idleConnectionTimeoutMillis)
protected void
initChannel(C ch)
This method will be called once theChannel
was registered.protected boolean
isUseCustomMultiplexHandler()
Deprecated.protected boolean
isValidateHeaders()
FACTORY
maxChunkSize(int maxChunkSize)
FACTORY
maxContentLength(long maxContentLength)
FACTORY
maxHeaderSize(int maxHeaderSize)
FACTORY
maxInitialLineLength(int maxInitialLineLength)
FACTORY
useCustomMultiplexHandler(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 theChannel
was registered. After the method returns this instance will be removed from theChannelPipeline
of theChannel
.- Specified by:
initChannel
in classChannelInitializer<C extends io.netty.channel.Channel>
- Parameters:
ch
- theChannel
which 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)
-
-