Bootstrap sub-class which allows easy bootstrap of ServerChannel
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile ServerChannelFactory | |
| private final Map | |
| private volatile EventLoopGroup | |
| private volatile ChannelHandler | |
| private final Map | |
| private final ServerBootstrapConfig | |
| private static final InternalLogger |
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ServerBootstrap | channel(Class<? extends ServerChannel> channelClass)
The |
| public ServerBootstrap | channelFactory(ServerChannelFactory<? extends ServerChannel> channelFactory)
|
| public <T> ServerBootstrap | childAttr(AttributeKey<T> childKey, T value)
Set the specific |
| pack-priv final Map | |
| public EventLoopGroup | childGroup()
Deprecated
Use
Return the configured config() instead.
EventLoopGroup which will be used for the child channels or null
if non is configured yet.
|
| public ServerBootstrap | childHandler(ChannelHandler childHandler)
Set the |
| pack-priv final ChannelHandler | |
| public <T> ServerBootstrap | childOption(ChannelOption<T> childOption, T value)
Allow to specify a |
| pack-priv final Map | |
| public ServerBootstrap | clone()
Implements abstract io. |
| public final ServerBootstrapConfig | config()
Implements abstract io. AbstractBootstrapConfig object that can be used to obtain the current config
of the bootstrap.
|
| public ServerBootstrap | group(EventLoopGroup group)
Overrides io. EventLoopGroup which is used for the parent (acceptor) and the child (client).
|
| public ServerBootstrap | group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
Set the |
| pack-priv Future | |
| pack-priv ServerChannel | newChannel(EventLoop eventLoop)
Implements abstract io. |
| public ServerBootstrap |
| channelFactory | back to summary |
|---|---|
| pack-priv volatile ServerChannelFactory<? extends ServerChannel> channelFactory | |
| childAttrs | back to summary |
|---|---|
| private final Map<AttributeKey<?>, Object> childAttrs | |
| childGroup | back to summary |
|---|---|
| private volatile EventLoopGroup childGroup | |
| childHandler | back to summary |
|---|---|
| private volatile ChannelHandler childHandler | |
| childOptions | back to summary |
|---|---|
| private final Map<ChannelOption<?>, Object> childOptions | |
| config | back to summary |
|---|---|
| private final ServerBootstrapConfig config | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| ServerBootstrap | back to summary |
|---|---|
| public ServerBootstrap() | |
| ServerBootstrap | back to summary |
|---|---|
| private ServerBootstrap(ServerBootstrap bootstrap) | |
| channel | back to summary |
|---|---|
| public ServerBootstrap channel(Class<? extends ServerChannel> channelClass) The | |
| channelFactory | back to summary |
|---|---|
| public ServerBootstrap channelFactory(ServerChannelFactory<? extends ServerChannel> channelFactory)
| |
| childAttr | back to summary |
|---|---|
| public <T> ServerBootstrap childAttr(AttributeKey<T> childKey, T value) Set the specific | |
| childAttrs | back to summary |
|---|---|
| pack-priv final Map | |
| childGroup | back to summary |
|---|---|
| public EventLoopGroup childGroup()
Deprecated Use Return the configured
| |
| childHandler | back to summary |
|---|---|
| public ServerBootstrap childHandler(ChannelHandler childHandler) Set the | |
| childHandler | back to summary |
|---|---|
| pack-priv final ChannelHandler childHandler() | |
| childOption | back to summary |
|---|---|
| public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value) Allow to specify a | |
| childOptions | back to summary |
|---|---|
| pack-priv final Map | |
| clone | back to summary |
|---|---|
| public ServerBootstrap clone() Implements abstract io. Doc from io. Returns a deep clone of this bootstrap which has the identical configuration. This method is useful when making
multiple
| |
| config | back to summary |
|---|---|
| public final ServerBootstrapConfig config() Implements abstract io. Doc from io. Returns the
| |
| group | back to summary |
|---|---|
| public ServerBootstrap group(EventLoopGroup group) Overrides io. Specify the
| |
| group | back to summary |
|---|---|
| public ServerBootstrap group(EventLoopGroup parentGroup, EventLoopGroup childGroup) Set the | |
| init | back to summary |
|---|---|
| pack-priv Future Implements abstract io.
| |
| newChannel | back to summary |
|---|---|
| pack-priv ServerChannel newChannel(EventLoop eventLoop) throws Exception Implements abstract io.
| |
| validate | back to summary |
|---|---|
| public ServerBootstrap validate() Overrides io. Doc from io. Validate all the parameters. Sub-classes may override this, but should call the super method in that case.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Map. | |
| private final ChannelHandler | |
| private final Map. | |
| private final Runnable |
| Access | Constructor and Description |
|---|---|
| pack-priv | ServerBootstrapAcceptor(final Channel channel, ChannelHandler childHandler, Map.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Overrides default io. Throwable was thrown when handling inbound events.
|
| public void | channelRead(ChannelHandlerContext ctx, Object msg)
Overrides default io. Channel has read a message from the peer.
|
| private static void | |
| private void |
| childAttrs | back to summary |
|---|---|
| private final Map. | |
| childHandler | back to summary |
|---|---|
| private final ChannelHandler childHandler | |
| childOptions | back to summary |
|---|---|
| private final Map. | |
| enableAutoReadTask | back to summary |
|---|---|
| private final Runnable enableAutoReadTask | |
| ServerBootstrapAcceptor | back to summary |
|---|---|
| pack-priv ServerBootstrapAcceptor(final Channel channel, ChannelHandler childHandler, Map. | |
| channelExceptionCaught | back to summary |
|---|---|
| public void channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Overrides default io. Doc from io. Gets called if a
| |
| channelRead | back to summary |
|---|---|
| public void channelRead(ChannelHandlerContext ctx, Object msg) Overrides default io. Doc from io. Invoked when the current
| |
| forceClose | back to summary |
|---|---|
| private static void forceClose(Channel child, Throwable t) | |
| initChild | back to summary |
|---|---|
| private void initChild(final Channel child) | |