public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap,ServerChannel>
Bootstrap sub-class which allows easy bootstrap of ServerChannel| Constructor and Description |
|---|
ServerBootstrap() |
| Modifier and Type | Method and Description |
|---|---|
<T> ServerBootstrap |
childAttr(AttributeKey<T> childKey,
T value)
Set the specific
AttributeKey with the given value on every child Channel. |
EventLoopGroup |
childGroup()
Return the configured
EventLoopGroup which will be used for the child channels or null
if non is configured yet. |
ServerBootstrap |
childHandler(ChannelHandler childHandler)
Set the
ChannelHandler which is used to serve the request for the Channel's. |
<T> ServerBootstrap |
childOption(ChannelOption<T> childOption,
T value)
Allow to specify a
ChannelOption which is used for the Channel instances once they get created
(after the acceptor accepted the Channel). |
ServerBootstrap |
clone()
Returns a deep clone of this bootstrap which has the identical configuration.
|
ServerBootstrap |
group(EventLoopGroup group)
Specify the
EventLoopGroup which is used for the parent (acceptor) and the child (client). |
ServerBootstrap |
group(EventLoopGroup parentGroup,
EventLoopGroup childGroup)
Set the
EventLoopGroup for the parent (acceptor) and the child (client). |
String |
toString() |
ServerBootstrap |
validate()
Validate all the parameters.
|
attr, bind, bind, bind, bind, bind, channel, channelFactory, channelFactory, group, handler, localAddress, localAddress, localAddress, localAddress, option, registerpublic ServerBootstrap group(EventLoopGroup group)
EventLoopGroup which is used for the parent (acceptor) and the child (client).group in class AbstractBootstrap<ServerBootstrap,ServerChannel>public ServerBootstrap group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
EventLoopGroup for the parent (acceptor) and the child (client). These
EventLoopGroup's are used to handle all the events and IO for ServerChannel and
Channel's.public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value)
ChannelOption which is used for the Channel instances once they get created
(after the acceptor accepted the Channel). Use a value of null to remove a previous set
ChannelOption.public <T> ServerBootstrap childAttr(AttributeKey<T> childKey, T value)
AttributeKey with the given value on every child Channel. If the value is
null the AttributeKey is removedpublic ServerBootstrap childHandler(ChannelHandler childHandler)
ChannelHandler which is used to serve the request for the Channel's.public EventLoopGroup childGroup()
EventLoopGroup which will be used for the child channels or null
if non is configured yet.public ServerBootstrap validate()
AbstractBootstrapvalidate in class AbstractBootstrap<ServerBootstrap,ServerChannel>public ServerBootstrap clone()
AbstractBootstrapChannels with similar settings. Please note that this method does not clone the
EventLoopGroup deeply but shallowly, making the group a shared resource.clone in class AbstractBootstrap<ServerBootstrap,ServerChannel>public String toString()
toString in class AbstractBootstrap<ServerBootstrap,ServerChannel>Copyright © 2008–2015 The Netty Project. All rights reserved.