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

pack-priv Class WebSocketServerProtocolHandshakeHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Imports
io.netty.channel.ChannelFuture, .ChannelFutureListener, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, .ChannelPipeline, .ChannelPromise, io.netty.handler.codec.http.HttpHeaderNames, .HttpObject, .HttpRequest, .HttpResponse, io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.ServerHandshakeStateEvent, io.netty.handler.ssl.SslHandler, io.netty.util.ReferenceCountUtil, io.netty.util.concurrent.Future, .FutureListener, java.util.concurrent.TimeUnit

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

Field Summary

Modifier and TypeField and Description
private ChannelHandlerContext
private ChannelPromise
private boolean
private final WebSocketServerProtocolConfig

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public void
private boolean
checkNextUri(String uri, String websocketPath)

private static String
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.
private boolean
private static void
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelActivechannelInactivechannelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangedexceptionCaughtuserEventTriggered

Field Detail

ctxback to summary
private ChannelHandlerContext ctx
handshakePromiseback to summary
private ChannelPromise 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()
channelReadback to summary
public void channelRead(final 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
checkNextUriback to summary
private 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 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
isWebSocketPathback to summary
private boolean isWebSocketPath(HttpRequest req)
sendHttpResponseback to summary
private static void sendHttpResponse(ChannelHandlerContext ctx, HttpRequest req, HttpResponse res)