@Internal public class NettyServerWebSocketHandler extends AbstractNettyWebSocketHandler
WebSocketFrame
instances.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
The id of the handler used when adding it to the Netty pipeline.
|
LOG, mediaTypeCodecRegistry, messageHandler, originatingRequest, session, uriVariables, webSocketBean, webSocketBinder, webSocketSessionRepository, webSocketVersion
Modifier and Type | Method and Description |
---|---|
boolean |
acceptInboundMessage(java.lang.Object msg) |
protected NettyRxWebSocketSession |
createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
Subclasses should implement to create the actual
NettyRxWebSocketSession . |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
protected io.reactivex.Flowable<?> |
instrumentPublisher(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object result)
Subclasses can override to customize publishers returned from message handlers.
|
protected java.lang.Object |
invokeExecutable(BoundExecutable boundExecutable,
MethodExecutionHandle<?,?> messageHandler)
Invokes the given executable.
|
protected void |
messageHandled(io.netty.channel.ChannelHandlerContext ctx,
NettyRxWebSocketSession session,
java.lang.Object message)
Method called once a message has been handled by the handler.
|
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
channelRead0, exceptionCaught, getBodyArgument, getSession, handleWebSocketFrame, writeCloseFrameAndTerminate
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
ensureNotSharable, handlerAdded, isSharable
public static final java.lang.String ID
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
userEventTriggered
in interface io.netty.channel.ChannelInboundHandler
userEventTriggered
in class io.netty.channel.ChannelInboundHandlerAdapter
java.lang.Exception
public boolean acceptInboundMessage(java.lang.Object msg)
acceptInboundMessage
in class io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
protected NettyRxWebSocketSession createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
AbstractNettyWebSocketHandler
NettyRxWebSocketSession
.createWebSocketSession
in class AbstractNettyWebSocketHandler
ctx
- The contextprotected io.reactivex.Flowable<?> instrumentPublisher(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object result)
AbstractNettyWebSocketHandler
instrumentPublisher
in class AbstractNettyWebSocketHandler
ctx
- The contextresult
- The resultprotected java.lang.Object invokeExecutable(BoundExecutable boundExecutable, MethodExecutionHandle<?,?> messageHandler)
AbstractNettyWebSocketHandler
invokeExecutable
in class AbstractNettyWebSocketHandler
boundExecutable
- The bound executablemessageHandler
- The message handlerprotected void messageHandled(io.netty.channel.ChannelHandlerContext ctx, NettyRxWebSocketSession session, java.lang.Object message)
AbstractNettyWebSocketHandler
messageHandled
in class AbstractNettyWebSocketHandler
ctx
- The channel handler contextsession
- The sessionmessage
- The message that was handledpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
handlerRemoved
in interface io.netty.channel.ChannelHandler
handlerRemoved
in class AbstractNettyWebSocketHandler
java.lang.Exception