public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap,ServerChannel>
Bootstrap子类,它允许容易引导ServerChannel
| Constructor and Description |
|---|
ServerBootstrap() |
| Modifier and Type | Method and Description |
|---|---|
<T> ServerBootstrap |
childAttr(AttributeKey<T> childKey, T value)
设置特定 AttributeKey与给定值的每一个孩子Channel 。
|
EventLoopGroup |
childGroup()
已过时。
改为使用
config() 。
|
ServerBootstrap |
childHandler(ChannelHandler childHandler)
设置 ChannelHandler这是用来服务于该请求Channel的。
|
<T> ServerBootstrap |
childOption(ChannelOption<T> childOption, T value)
允许指定 ChannelOption其用于Channel种情况下,一旦它们开始创建(受体后接受了Channel )。
|
ServerBootstrap |
clone()
返回具有相同配置的此引导程序的深层克隆。
|
ServerBootstrapConfig |
config()
返回可用于获取引导程序当前配置的 AbstractBootstrapConfig对象。
|
ServerBootstrap |
group(EventLoopGroup group)
指定用于父级(接受者)和子级(客户端)的 EventLoopGroup 。
|
ServerBootstrap |
group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
为父(受主)和孩子(客户)设置 EventLoopGroup 。
|
ServerBootstrap |
validate()
验证所有参数。
|
attr, bind, bind, bind, bind, bind, channel, channelFactory, channelFactory, group, handler, localAddress, localAddress, localAddress, localAddress, option, register, toStringpublic ServerBootstrap group(EventLoopGroup group)
EventLoopGroup 。
public ServerBootstrap group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
EventLoopGroup 。
这些EventLoopGroup用于处理ServerChannel和Channel的所有事件和IO。
public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value)
ChannelOption其用于Channel种情况下,一旦它们开始创建(受体后接受了Channel )。
使用值null删除以前的一组ChannelOption 。
public <T> ServerBootstrap childAttr(AttributeKey<T> childKey, T value)
AttributeKey与给定值的每一个孩子Channel 。
如果值为null , 则会删除AttributeKey
public ServerBootstrap childHandler(ChannelHandler childHandler)
ChannelHandler这是用来服务于该请求Channel的。
public ServerBootstrap validate()
AbstractBootstrap
public ServerBootstrap clone()
AbstractBootstrap
clone在课堂上
AbstractBootstrap<ServerBootstrap,ServerChannel>
@Deprecated public EventLoopGroup childGroup()
config() 。
EventLoopGroup ,其将用于所述子频道或null如果非被被配置。
public final ServerBootstrapConfig config()
AbstractBootstrap
AbstractBootstrapConfig对象。
config在课堂上
AbstractBootstrap<ServerBootstrap,ServerChannel>
Copyright © 2008–2018 The Netty Project. All rights reserved.