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

pack-priv Class WebSocketClientProtocolHandshakeHandler

extends Object
implements ChannelHandler
Class Inheritance
All Implemented Interfaces
io.netty5.channel.ChannelHandler
Imports
io.netty5.channel.ChannelHandler, .ChannelHandlerContext, io.netty5.handler.codec.http.FullHttpResponse, io.netty5.util.concurrent.Future, .Promise, java.util.concurrent.TimeUnit

Field Summary

Modifier and TypeField and Description
private ChannelHandlerContext
private static final long
private Promise<Void>
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
channelInactive(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.
public void
channelRead(ChannelHandlerContext ctx, Object msg)

Overrides default io.netty5.channel.ChannelHandler.channelRead.

Invoked when the current Channel has read a message from the peer.
pack-priv Future<Void>

Returns:

current handshake future
getHandshakeFuture
()

This method is visible for testing.

public void
handlerAdded(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

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 Promise<Void> 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 default io.netty5.channel.ChannelHandler.channelActive.

Doc from io.netty5.channel.ChannelHandler.channelActive.

The Channel of the ChannelHandlerContext is now active

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

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

Doc from io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.

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

Overrides default io.netty5.channel.ChannelHandler.channelRead.

Doc from io.netty5.channel.ChannelHandler.channelRead.

Invoked when the current Channel has read a message from the peer.

Annotations
@Override
getHandshakeFutureback to summary
pack-priv Future<Void> getHandshakeFuture()

This method is visible for testing.

Returns:Future<Void>

current handshake future

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

Overrides default io.netty5.channel.ChannelHandler.handlerAdded.

Doc from io.netty5.channel.ChannelHandler.handlerAdded.

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

Annotations
@Override