类 AbstractChannelInBoundHandler<T>
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<T>
com.walker.tcp.netty.AbstractChannelInBoundHandler<T>
- 类型参数:
T-
- 所有已实现的接口:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- 直接已知子类:
DefaultLongHandler
public abstract class AbstractChannelInBoundHandler<T>
extends io.netty.channel.SimpleChannelInboundHandler<T>
把之前
DefaultLongHandler里面的代码抽象出来了,因为泛型参数受到影响,所以把不涉及类型的代码聚在一起。- 作者:
- 时克英
-
嵌套类概要
从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
字段概要
字段修饰符和类型字段说明protected ConnectionManagerprotected final org.slf4j.Loggerprotected final ThreadLocal<T>protected ServerHandler<T> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) voidsetConnectionManager(ConnectionManager connectionManager) voidsetTcpServerHandler(ServerHandler<T> tcpServerHandler) voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) 一段时间未进行读写操作 回调从类继承的方法 io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead, channelRead0从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged从类继承的方法 io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 io.netty.channel.ChannelHandler
handlerAdded
-
字段详细资料
-
logger
protected final transient org.slf4j.Logger logger -
tcpServerHandler
-
connectionManager
-
msgThreadLocal
-
-
构造器详细资料
-
AbstractChannelInBoundHandler
public AbstractChannelInBoundHandler()
-
-
方法详细资料
-
setConnectionManager
-
setTcpServerHandler
-
channelActive
- 指定者:
channelActive在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
channelActive在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-
channelInactive
- 指定者:
channelInactive在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
channelInactive在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - 指定者:
exceptionCaught在接口中io.netty.channel.ChannelHandler- 指定者:
exceptionCaught在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
exceptionCaught在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-
handlerRemoved
- 指定者:
handlerRemoved在接口中io.netty.channel.ChannelHandler- 覆盖:
handlerRemoved在类中io.netty.channel.ChannelHandlerAdapter- 抛出:
Exception
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception 一段时间未进行读写操作 回调- 指定者:
userEventTriggered在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
userEventTriggered在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-