@Internal public class NettyServerWebSocketUpgradeHandler extends io.netty.channel.SimpleChannelInboundHandler<NettyHttpRequest<?>>
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
SCHEME_SECURE_WEBSOCKET |
static String |
SCHEME_WEBSOCKET |
| Constructor and Description |
|---|
NettyServerWebSocketUpgradeHandler(WebSocketSessionRepository webSocketSessionRepository,
Router router,
RequestBinderRegistry binderRegistry,
WebSocketBeanRegistry webSocketBeanRegistry,
MediaTypeCodecRegistry mediaTypeCodecRegistry,
ApplicationEventPublisher eventPublisher)
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 NettyServerWebSocketUpgradeHandler(WebSocketSessionRepository webSocketSessionRepository, Router router, RequestBinderRegistry binderRegistry, WebSocketBeanRegistry webSocketBeanRegistry, MediaTypeCodecRegistry mediaTypeCodecRegistry, ApplicationEventPublisher eventPublisher)
webSocketSessionRepository - The websocket sessions repositoryrouter - The routerbinderRegistry - the request binder registrywebSocketBeanRegistry - The web socket bean registermediaTypeCodecRegistry - The codec registryeventPublisher - The event publisherpublic 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