T
- The type emitted.@Internal public class NettyWebSocketClientHandler<T> extends AbstractNettyWebSocketHandler
ID, LOG, mediaTypeCodecRegistry, messageHandler, session, uriVariables, webSocketBinder, webSocketSessionRepository, webSocketVersion
Constructor and Description |
---|
NettyWebSocketClientHandler(MutableHttpRequest<?> request,
WebSocketBean<T> webSocketBean,
io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker,
RequestBinderRegistry requestBinderRegistry,
MediaTypeCodecRegistry mediaTypeCodecRegistry,
io.reactivex.FlowableEmitter<T> emitter)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
protected NettyRxWebSocketSession |
createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
Subclasses should implement to create the actual
NettyRxWebSocketSession . |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
Argument<?> |
getBodyArgument() |
NettyRxWebSocketSession |
getSession() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
handlerRemoved, handleWebSocketFrame, instrumentPublisher, invokeExecutable, messageHandled, writeCloseFrameAndTerminate
acceptInboundMessage, channelRead
public NettyWebSocketClientHandler(MutableHttpRequest<?> request, WebSocketBean<T> webSocketBean, io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, RequestBinderRegistry requestBinderRegistry, MediaTypeCodecRegistry mediaTypeCodecRegistry, io.reactivex.FlowableEmitter<T> emitter)
request
- The originating request that created the WebSocket.webSocketBean
- The WebSocket client bean.handshaker
- The handshakerrequestBinderRegistry
- The request binder registrymediaTypeCodecRegistry
- The media type codec registryemitter
- The socket emitterpublic 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 Argument<?> getBodyArgument()
getBodyArgument
in class AbstractNettyWebSocketHandler
public NettyRxWebSocketSession getSession()
getSession
in class AbstractNettyWebSocketHandler
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
channelRead0
in class AbstractNettyWebSocketHandler
protected NettyRxWebSocketSession createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
AbstractNettyWebSocketHandler
NettyRxWebSocketSession
.createWebSocketSession
in class AbstractNettyWebSocketHandler
ctx
- The contextpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class AbstractNettyWebSocketHandler