Top Fields Constructors Methods
io.netty.handler.codec.http.websocketx

pack-priv Class WebSocketClientProtocolHandshakeHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Imports
io.netty.channel.ChannelFuture, .ChannelFutureListener, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, .ChannelPromise, io.netty.handler.codec.http.FullHttpResponse, io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler.ClientHandshakeStateEvent, io.netty.util.concurrent.Future, .FutureListener, java.util.concurrent.TimeUnit

Field Summary

Modifier and TypeField and Description
private ChannelHandlerContext
private static final long
private ChannelPromise
private final WebSocketClientHandshaker
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
WebSocketClientProtocolHandshakeHandler(WebSocketClientHandshaker handshaker, long handshakeTimeoutMillis)

Method Summary

Modifier and TypeMethod and Description
private void
public void
public void
public void
pack-priv ChannelFuture

Returns:

current handshake future
getHandshakeFuture
()

This method is visible for testing.

public void
handlerAdded(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelHandlerAdapter.handlerAdded.

Implements io.netty.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangedexceptionCaughtuserEventTriggered

Field Detail

ctxback to summary
private ChannelHandlerContext ctx
DEFAULT_HANDSHAKE_TIMEOUT_MSback to summary
private static final long DEFAULT_HANDSHAKE_TIMEOUT_MS
handshakePromiseback to summary
private ChannelPromise handshakePromise
handshakerback to summary
private final WebSocketClientHandshaker handshaker
handshakeTimeoutMillisback to summary
private final long handshakeTimeoutMillis

Constructor Detail

WebSocketClientProtocolHandshakeHandlerback to summary
pack-priv WebSocketClientProtocolHandshakeHandler(WebSocketClientHandshaker handshaker)
WebSocketClientProtocolHandshakeHandlerback to summary
pack-priv WebSocketClientProtocolHandshakeHandler(WebSocketClientHandshaker handshaker, long handshakeTimeoutMillis)

Method Detail

applyHandshakeTimeoutback to summary
private void applyHandshakeTimeout()
channelActiveback to summary
public void channelActive(final ChannelHandlerContext ctx) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelActive.

Implements io.netty.channel.ChannelInboundHandler.channelActive.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelActive.

Calls ChannelHandlerContext#fireChannelActive() to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
channelInactiveback to summary
public void channelInactive(ChannelHandlerContext ctx) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Implements io.netty.channel.ChannelInboundHandler.channelInactive.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Calls ChannelHandlerContext#fireChannelInactive() to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Implements io.netty.channel.ChannelInboundHandler.channelRead.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Calls ChannelHandlerContext#fireChannelRead(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
getHandshakeFutureback to summary
pack-priv ChannelFuture getHandshakeFuture()

This method is visible for testing.

Returns:ChannelFuture

current handshake future

handlerAddedback to summary
public void handlerAdded(ChannelHandlerContext ctx) throws Exception

Overrides io.netty.channel.ChannelHandlerAdapter.handlerAdded.

Implements io.netty.channel.ChannelHandler.handlerAdded.

Doc from io.netty.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.

Annotations
@Override