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

pack-priv Class WebSocketServerProtocolHandshakeHandler

extends Object
implements ChannelHandler
Class Inheritance
All Implemented Interfaces
io.netty5.channel.ChannelHandler
Imports
io.netty5.channel.ChannelFutureListeners, .ChannelHandler, .ChannelHandlerContext, .ChannelPipeline, io.netty5.handler.codec.http.DefaultFullHttpResponse, .HttpHeaderNames, .HttpObject, .HttpRequest, .HttpResponse, io.netty5.handler.ssl.SslHandler, io.netty5.util.concurrent.Future, .Promise, java.util.Objects, java.util.concurrent.TimeUnit

Handles the HTTP handshake (the HTTP Upgrade request) for WebSocketServerProtocolHandler.

Field Summary

Modifier and TypeField and Description
private Promise<Void>
private boolean
private final WebSocketServerProtocolConfig

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public void
channelRead(final ChannelHandlerContext ctx, Object msg)

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

Invoked when the current Channel has read a message from the peer.
private static boolean
checkNextUri(String uri, String websocketPath)

private static String
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.
private boolean
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handshakePromiseback to summary
private Promise<Void> handshakePromise
isWebSocketPathback to summary
private boolean isWebSocketPath
serverConfigback to summary
private final WebSocketServerProtocolConfig serverConfig

Constructor Detail

WebSocketServerProtocolHandshakeHandlerback to summary
pack-priv WebSocketServerProtocolHandshakeHandler(WebSocketServerProtocolConfig serverConfig)

Method Detail

applyHandshakeTimeoutback to summary
private void applyHandshakeTimeout(ChannelHandlerContext ctx)
channelReadback to summary
public void channelRead(final 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
checkNextUriback to summary
private static boolean checkNextUri(String uri, String websocketPath)
getWebSocketLocationback to summary
private static String getWebSocketLocation(ChannelPipeline cp, HttpRequest req, String path)
handlerAddedback to summary
public void handlerAdded(ChannelHandlerContext ctx)

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
isWebSocketPathback to summary
private boolean isWebSocketPath(HttpRequest req)
sendHttpResponseback to summary
private static void sendHttpResponse(ChannelHandlerContext ctx, HttpRequest req, HttpResponse res)