org.apache.tinkerpop.gremlin.driver.handler

## Class WebSocketClientHandler

- java.lang.Object
- - io.netty.channel.ChannelHandlerAdapter
  - - io.netty.channel.ChannelInboundHandlerAdapter
    - - io.netty.handler.codec.MessageToMessageDecoder<io.netty.handler.codec.http.websocketx.WebSocketFrame>
      - - io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler
        - - org.apache.tinkerpop.gremlin.driver.handler.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).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WebSocketClientHandler.InterceptedWebSocketClientHandshaker13` Extension to the Netty implementation that allows for the `WebSocketClientHandler.InterceptedWebSocketClientHandshaker13.newHandshakeRequest()` to be modified by way of a `HandshakeInterceptor` that is supplied to the `Cluster` when it is created.

    - ### Nested classes/interfaces inherited from class io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler

      `io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler.ClientHandshakeStateEvent`

    - ### Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

      `io.netty.channel.ChannelHandler.Sharable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, long timeoutMillis)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `channelInactive(io.netty.channel.ChannelHandlerContext ctx)`
    `void` | `exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)`
    `void` | `handlerAdded(io.netty.channel.ChannelHandlerContext ctx)`
    `io.netty.channel.ChannelFuture` | `handshakeFuture()`
    `void` | `userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object event)`

    - ### 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 class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.netty.channel.ChannelHandler

      `handlerRemoved`

- - ### Constructor Detail

    - #### WebSocketClientHandler

          public WebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker,
                                        long timeoutMillis)

  - ### 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`
      Overrides:
        `exceptionCaught` in class `io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler`
      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`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.