类 DefaultServerInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
com.walker.tcp.netty.DefaultServerInitializer
- 所有已实现的接口:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- 直接已知子类:
WebSocketServerInitializer
public class DefaultServerInitializer
extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
-
嵌套类概要
从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidinitChannel(io.netty.channel.socket.SocketChannel ch) protected voidinitProtocolResolvers(io.netty.channel.ChannelPipeline pipeline) voidsetHandler(DefaultLongHandler handler) 设置系统handlervoidsetProtocolResolverList(List<ProtocolResolver<?>> protocolResolverList) 设置协议解析器集合voidsetShowLog(boolean showLog) voidsetTimeOutAll(int timeOutAll) voidsetTimeOutRead(int timeOutRead) voidsetTimeOutWrite(int timeOutWrite) 从类继承的方法 io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered从类继承的方法 io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
字段详细资料
-
logger
protected final transient org.slf4j.Logger logger
-
-
构造器详细资料
-
DefaultServerInitializer
public DefaultServerInitializer()
-
-
方法详细资料
-
setShowLog
public void setShowLog(boolean showLog) -
setTimeOutRead
public void setTimeOutRead(int timeOutRead) -
setTimeOutWrite
public void setTimeOutWrite(int timeOutWrite) -
setTimeOutAll
public void setTimeOutAll(int timeOutAll) -
setProtocolResolverList
设置协议解析器集合- 参数:
protocolResolverList-
-
setHandler
设置系统handler- 参数:
handler-
-
initChannel
- 指定者:
initChannel在类中io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>- 抛出:
Exception
-
initProtocolResolvers
protected void initProtocolResolvers(io.netty.channel.ChannelPipeline pipeline) -
getHandler
-