Class WebSocketClientHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

    public final class WebSocketClientHandler
    extends io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler
    Wrapper over WebSocketClientProtocolHandler. This wrapper provides a future which represents the termination of a WS handshake (both success and failure).
    • Constructor Summary

      Constructors 
      Constructor Description
      WebSocketClientHandler​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, long timeoutMillis, boolean useSsl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(io.netty.channel.ChannelHandlerContext arg0, SocketAddress arg1, io.netty.channel.ChannelPromise arg2)  
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      void close​(io.netty.channel.ChannelHandlerContext arg0, io.netty.channel.ChannelPromise arg1)  
      void connect​(io.netty.channel.ChannelHandlerContext arg0, SocketAddress arg1, SocketAddress arg2, io.netty.channel.ChannelPromise arg3)  
      void deregister​(io.netty.channel.ChannelHandlerContext arg0, io.netty.channel.ChannelPromise arg1)  
      void disconnect​(io.netty.channel.ChannelHandlerContext arg0, io.netty.channel.ChannelPromise arg1)  
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)  
      void flush​(io.netty.channel.ChannelHandlerContext arg0)  
      void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)  
      io.netty.channel.ChannelFuture handshakeFuture()  
      void read​(io.netty.channel.ChannelHandlerContext arg0)  
      void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx, Object event)  
      void write​(io.netty.channel.ChannelHandlerContext arg0, Object arg1, io.netty.channel.ChannelPromise arg2)  
      • Methods inherited from class io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler

        buildHandshakeException, decode, handshaker
      • Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder

        acceptInboundMessage, channelRead
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerRemoved
    • Constructor Detail

      • WebSocketClientHandler

        public WebSocketClientHandler​(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker,
                                      long timeoutMillis,
                                      boolean useSsl)
    • Method Detail

      • handshakeFuture

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

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
        Specified by:
        handlerAdded in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerAdded in class io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
                             throws Exception
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelInboundHandler
        Throws:
        Exception
      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
                             throws Exception
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • userEventTriggered

        public void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx,
                                       Object event)
                                throws Exception
        Specified by:
        userEventTriggered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        userEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • close

        public void close​(io.netty.channel.ChannelHandlerContext arg0,
                          io.netty.channel.ChannelPromise arg1)
                   throws Exception
        Specified by:
        close in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • write

        public void write​(io.netty.channel.ChannelHandlerContext arg0,
                          Object arg1,
                          io.netty.channel.ChannelPromise arg2)
                   throws Exception
        Specified by:
        write in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • bind

        public void bind​(io.netty.channel.ChannelHandlerContext arg0,
                         SocketAddress arg1,
                         io.netty.channel.ChannelPromise arg2)
                  throws Exception
        Specified by:
        bind in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • connect

        public void connect​(io.netty.channel.ChannelHandlerContext arg0,
                            SocketAddress arg1,
                            SocketAddress arg2,
                            io.netty.channel.ChannelPromise arg3)
                     throws Exception
        Specified by:
        connect in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • disconnect

        public void disconnect​(io.netty.channel.ChannelHandlerContext arg0,
                               io.netty.channel.ChannelPromise arg1)
                        throws Exception
        Specified by:
        disconnect in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • deregister

        public void deregister​(io.netty.channel.ChannelHandlerContext arg0,
                               io.netty.channel.ChannelPromise arg1)
                        throws Exception
        Specified by:
        deregister in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • read

        public void read​(io.netty.channel.ChannelHandlerContext arg0)
                  throws Exception
        Specified by:
        read in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception
      • flush

        public void flush​(io.netty.channel.ChannelHandlerContext arg0)
                   throws Exception
        Specified by:
        flush in interface io.netty.channel.ChannelOutboundHandler
        Throws:
        Exception