Class WebSocketClientProtocolHandshakeHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandshakeHandler
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelHandlerContext
private static final long
private ChannelPromise
private final WebSocketClientHandshaker
private final long
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketClientProtocolHandshakeHandler
(WebSocketClientHandshaker handshaker, long handshakeTimeoutMillis) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
CallsChannelHandlerContext.fireChannelActive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelInactive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
channelRead
(ChannelHandlerContext ctx, Object msg) CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.(package private) ChannelFuture
This method is visible for testing.void
Do nothing by default, sub-classes may override this method.Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
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
-
Field Details
-
DEFAULT_HANDSHAKE_TIMEOUT_MS
private static final long DEFAULT_HANDSHAKE_TIMEOUT_MS- See Also:
-
handshaker
-
handshakeTimeoutMillis
private final long handshakeTimeoutMillis -
ctx
-
handshakePromise
-
-
Constructor Details
-
WebSocketClientProtocolHandshakeHandler
WebSocketClientProtocolHandshakeHandler(WebSocketClientHandshaker handshaker) -
WebSocketClientProtocolHandshakeHandler
WebSocketClientProtocolHandshakeHandler(WebSocketClientHandshaker handshaker, long handshakeTimeoutMillis)
-
-
Method Details
-
handlerAdded
Description copied from class:ChannelHandlerAdapter
Do nothing by default, sub-classes may override this method.- Specified by:
handlerAdded
in interfaceChannelHandler
- Overrides:
handlerAdded
in classChannelHandlerAdapter
- Throws:
Exception
-
channelActive
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireChannelActive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelActive
in interfaceChannelInboundHandler
- Overrides:
channelActive
in classChannelInboundHandlerAdapter
- Throws:
Exception
-
channelInactive
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireChannelInactive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelInactive
in interfaceChannelInboundHandler
- Overrides:
channelInactive
in classChannelInboundHandlerAdapter
- Throws:
Exception
-
channelRead
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelRead
in interfaceChannelInboundHandler
- Overrides:
channelRead
in classChannelInboundHandlerAdapter
- Throws:
Exception
-
applyHandshakeTimeout
private void applyHandshakeTimeout() -
getHandshakeFuture
ChannelFuture getHandshakeFuture()This method is visible for testing.- Returns:
- current handshake future
-