类 NettyServerHandler

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

    @Sharable
    public class NettyServerHandler
    extends io.netty.channel.ChannelDuplexHandler
    NettyClientHandler
    • 嵌套类概要

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

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

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void channelActive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx,  msg)  
      void disconnect​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise future)  
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,  cause)  
      <,​Channel> getChannels()  
      void write​(io.netty.channel.ChannelHandlerContext ctx,  msg, io.netty.channel.ChannelPromise promise)  
      • 从类继承的方法 io.netty.channel.ChannelDuplexHandler

        bind, close, connect, deregister, flush, read
      • 从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter

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

        handlerAdded, handlerRemoved, isSharable
      • 从类继承的方法 java.lang.

        , , , , , , , ,
      • 从接口继承的方法 io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • 构造器详细资料

      • NettyServerHandler

        public NettyServerHandler​(URL url,
                                  ChannelHandler handler)
    • 方法详细资料

      • getChannels

        public <,​Channel> getChannels()
      • channelActive

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

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

        public void disconnect​(io.netty.channel.ChannelHandlerContext ctx,
                               io.netty.channel.ChannelPromise future)
                        throws 
        指定者:
        disconnect 在接口中 io.netty.channel.ChannelOutboundHandler
        覆盖:
        disconnect 在类中 io.netty.channel.ChannelDuplexHandler
        抛出:
      • channelRead

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

        public void write​(io.netty.channel.ChannelHandlerContext ctx,
                           msg,
                          io.netty.channel.ChannelPromise promise)
                   throws 
        指定者:
        write 在接口中 io.netty.channel.ChannelOutboundHandler
        覆盖:
        write 在类中 io.netty.channel.ChannelDuplexHandler
        抛出:
      • exceptionCaught

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