类 BaseServerHandler<T>

  • 所有已实现的接口:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
    直接已知子类:
    SocksServerHandler, WebSocketServerHandler

    public abstract class BaseServerHandler<T>
    extends io.netty.channel.SimpleChannelInboundHandler<T>
    作者:
    Alum(alum @ live.cn)
    • 嵌套类概要

      • 从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected io.netty.util.internal.logging.InternalLogger logger  
    • 字段详细资料

      • logger

        protected final io.netty.util.internal.logging.InternalLogger logger
    • 构造器详细资料

      • BaseServerHandler

        public BaseServerHandler()
    • 方法详细资料

      • getProperties

        protected AioConfig getProperties()
        获取 aio 配置信息
        返回:
      • getAioReceiver

        protected AioReceive getAioReceiver()
        获取接受对象
        返回:
      • onClose

        public void onClose​(io.netty.channel.Channel ch,
                            AioClose aioClose)
        关闭连接
        参数:
        ch -
        aioClose -
      • handlerAdded

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
                          throws Exception
        添加
        指定者:
        handlerAdded 在接口中 io.netty.channel.ChannelHandler
        覆盖:
        handlerAdded 在类中 io.netty.channel.ChannelHandlerAdapter
        参数:
        ctx -
        抛出:
        Exception
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
        指定者:
        exceptionCaught 在接口中 io.netty.channel.ChannelHandler
        指定者:
        exceptionCaught 在接口中 io.netty.channel.ChannelInboundHandler
        覆盖:
        exceptionCaught 在类中 io.netty.channel.ChannelInboundHandlerAdapter
      • channelRegistered

        public void channelRegistered​(io.netty.channel.ChannelHandlerContext ctx)
                               throws Exception
        注册
        指定者:
        channelRegistered 在接口中 io.netty.channel.ChannelInboundHandler
        覆盖:
        channelRegistered 在类中 io.netty.channel.ChannelInboundHandlerAdapter
        参数:
        ctx -
        抛出:
        Exception
      • channelActive

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

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

        protected abstract void channelRead0​(io.netty.channel.ChannelHandlerContext channelHandlerContext,
                                             T t)
                                      throws Exception
        指定者:
        channelRead0 在类中 io.netty.channel.SimpleChannelInboundHandler<T>
        抛出:
        Exception
      • channelReadComplete

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

        public void channelUnregistered​(io.netty.channel.ChannelHandlerContext ctx)
                                 throws Exception
        指定者:
        channelUnregistered 在接口中 io.netty.channel.ChannelInboundHandler
        覆盖:
        channelUnregistered 在类中 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)
        指定者:
        userEventTriggered 在接口中 io.netty.channel.ChannelInboundHandler
        覆盖:
        userEventTriggered 在类中 io.netty.channel.ChannelInboundHandlerAdapter
      • heartBeat

        protected void heartBeat​(io.netty.channel.Channel ch)
        心跳超时逻辑处理
        参数:
        ch -