类 ClientHandler

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

    public class ClientHandler
    extends io.netty.channel.SimpleChannelInboundHandler<Object>
    客户端事件触发处理类 Client Event Triggering Processing Class
    作者:
    tag 2019/2/21
    • 嵌套类概要

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

        io.netty.channel.ChannelHandler.Sharable
    • 构造器概要

      构造器 
      构造器 说明
      ClientHandler​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handShaker)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      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.ChannelPromise getHandshakeFuture()  
      io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker getHandshaker()  
      void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)  
      io.netty.channel.ChannelFuture handshakeFuture()  
      void setHandshakeFuture​(io.netty.channel.ChannelPromise handshakeFuture)  
      void setHandshaker​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handShaker)  
      • 从类继承的方法 io.netty.channel.SimpleChannelInboundHandler

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

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

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

        handlerRemoved
    • 构造器详细资料

      • ClientHandler

        public ClientHandler​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handShaker)
    • 方法详细资料

      • handlerAdded

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
        指定者:
        handlerAdded 在接口中 io.netty.channel.ChannelHandler
        覆盖:
        handlerAdded 在类中 io.netty.channel.ChannelHandlerAdapter
      • getHandshaker

        public io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker getHandshaker()
      • setHandshaker

        public void setHandshaker​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handShaker)
      • getHandshakeFuture

        public io.netty.channel.ChannelPromise getHandshakeFuture()
      • setHandshakeFuture

        public void setHandshakeFuture​(io.netty.channel.ChannelPromise handshakeFuture)
      • handshakeFuture

        public io.netty.channel.ChannelFuture handshakeFuture()
      • channelActive

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