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 overWebSocketClientProtocolHandler
. 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 Description static class
WebSocketClientHandler.InterceptedWebSocketClientHandshaker13
Extension to the Netty implementation that allows for theWebSocketClientHandler.InterceptedWebSocketClientHandshaker13.newHandshakeRequest()
to be modified by way of aHandshakeInterceptor
that is supplied to theCluster
when it is created.
-
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
-
-
-
-
Method Detail
-
handshakeFuture
public io.netty.channel.ChannelFuture handshakeFuture()
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Throws:
Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object event) throws Exception
- Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.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 interfaceio.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 interfaceio.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 interfaceio.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 interfaceio.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 interfaceio.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 interfaceio.netty.channel.ChannelOutboundHandler
- Throws:
Exception
-
read
public void read(io.netty.channel.ChannelHandlerContext arg0) throws Exception
- Specified by:
read
in interfaceio.netty.channel.ChannelOutboundHandler
- Throws:
Exception
-
-