@Internal public class NettyServerWebSocketUpgradeHandler extends io.netty.channel.SimpleChannelInboundHandler<NettyHttpRequest<?>>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPRESSION_HANDLER |
static java.lang.String |
ID |
static java.lang.String |
SCHEME_SECURE_WEBSOCKET |
static java.lang.String |
SCHEME_WEBSOCKET |
| Constructor and Description |
|---|
NettyServerWebSocketUpgradeHandler(NettyEmbeddedServices embeddedServices,
WebSocketSessionRepository webSocketSessionRepository)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptInboundMessage(java.lang.Object msg) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
NettyHttpRequest<?> msg) |
protected java.lang.String |
getWebSocketURL(io.netty.channel.ChannelHandlerContext ctx,
HttpRequest req)
Obtains the web socket URL.
|
protected io.netty.channel.ChannelFuture |
handleHandshake(io.netty.channel.ChannelHandlerContext ctx,
NettyHttpRequest req,
WebSocketBean<?> webSocketBean,
MutableHttpResponse<?> response)
Do the handshaking for WebSocket request.
|
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic static final java.lang.String ID
public static final java.lang.String SCHEME_WEBSOCKET
public static final java.lang.String SCHEME_SECURE_WEBSOCKET
public static final java.lang.String COMPRESSION_HANDLER
public NettyServerWebSocketUpgradeHandler(NettyEmbeddedServices embeddedServices, WebSocketSessionRepository webSocketSessionRepository)
embeddedServices - The embedded server serviceswebSocketSessionRepository - The websocket session repositorypublic boolean acceptInboundMessage(java.lang.Object msg)
acceptInboundMessage in class io.netty.channel.SimpleChannelInboundHandler<NettyHttpRequest<?>>protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
NettyHttpRequest<?> msg)
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<NettyHttpRequest<?>>protected io.netty.channel.ChannelFuture handleHandshake(io.netty.channel.ChannelHandlerContext ctx,
NettyHttpRequest req,
WebSocketBean<?> webSocketBean,
MutableHttpResponse<?> response)
ctx - The channel handler contextreq - The requestwebSocketBean - The web socket beanresponse - The responseprotected java.lang.String getWebSocketURL(io.netty.channel.ChannelHandlerContext ctx,
HttpRequest req)
ctx - The contextreq - The request