@Internal public class NettyServerWebSocketUpgradeHandler extends io.netty.channel.SimpleChannelInboundHandler<NettyHttpRequest<?>>
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPRESSION_HANDLER |
static String |
ID |
static String |
SCHEME_SECURE_WEBSOCKET |
static String |
SCHEME_WEBSOCKET |
| Constructor and Description |
|---|
NettyServerWebSocketUpgradeHandler(NettyEmbeddedServices embeddedServices,
WebSocketSessionRepository webSocketSessionRepository)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptInboundMessage(Object msg) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
NettyHttpRequest<?> msg) |
protected 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 String ID
public static final String SCHEME_WEBSOCKET
public static final String SCHEME_SECURE_WEBSOCKET
public static final String COMPRESSION_HANDLER
public NettyServerWebSocketUpgradeHandler(NettyEmbeddedServices embeddedServices, WebSocketSessionRepository webSocketSessionRepository)
embeddedServices - The embedded server serviceswebSocketSessionRepository - The websocket session repositorypublic boolean acceptInboundMessage(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 String getWebSocketURL(io.netty.channel.ChannelHandlerContext ctx, HttpRequest req)
ctx - The contextreq - The request