类 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里面的代码抽象出来了,因为泛型参数受到影响,所以把不涉及类型的代码聚在一起。
作者:
时克英
  • 字段详细资料

    • logger

      protected final transient org.slf4j.Logger logger
    • tcpServerHandler

      protected ServerHandler<T> tcpServerHandler
    • connectionManager

      protected ConnectionManager connectionManager
    • msgThreadLocal

      protected final ThreadLocal<T> msgThreadLocal
  • 构造器详细资料

    • AbstractChannelInBoundHandler

      public AbstractChannelInBoundHandler()
  • 方法详细资料

    • setConnectionManager

      public void setConnectionManager(ConnectionManager connectionManager)
    • setTcpServerHandler

      public void setTcpServerHandler(ServerHandler<T> tcpServerHandler)
    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      指定者:
      channelActive 在接口中 io.netty.channel.ChannelInboundHandler
      覆盖:
      channelActive 在类中 io.netty.channel.ChannelInboundHandlerAdapter
      抛出:
      Exception
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      指定者:
      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

      public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      指定者:
      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