类 ServerHandler

  • 所有已实现的接口:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class ServerHandler
    extends io.netty.channel.SimpleChannelInboundHandler<Object>
    服务器端事件触发处理类 Server-side event trigger processing class
    作者:
    tag 2019/2/21
    • 嵌套类概要

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

        io.netty.channel.ChannelHandler.Sharable
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void channelActive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      protected void channelRead0​(io.netty.channel.ChannelHandlerContext ctx, Object msg)  
      void channelUnregistered​(io.netty.channel.ChannelHandlerContext ctx)  
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)  
      • 从类继承的方法 io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead
      • 从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter

        channelReadComplete, channelRegistered, channelWritabilityChanged, userEventTriggered
      • 从类继承的方法 io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • 从接口继承的方法 io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • 构造器详细资料

      • ServerHandler

        public ServerHandler()
    • 方法详细资料

      • channelActive

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

        protected void channelRead0​(io.netty.channel.ChannelHandlerContext ctx,
                                    Object msg)
                             throws Exception
        指定者:
        channelRead0 在类中 io.netty.channel.SimpleChannelInboundHandler<Object>
        抛出:
        Exception
      • channelUnregistered

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