T
- The type emitted.@Internal public class NettyWebSocketClientHandler<T> extends AbstractNettyWebSocketHandler
ID, LOG, mediaTypeCodecRegistry, messageHandler, originatingRequest, pongHandler, session, subProtocol, uriVariables, webSocketBean, webSocketBinder, webSocketSessionRepository, webSocketVersion
Constructor and Description |
---|
NettyWebSocketClientHandler(MutableHttpRequest<?> request,
WebSocketBean<T> webSocketBean,
io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker,
RequestBinderRegistry requestBinderRegistry,
MediaTypeCodecRegistry mediaTypeCodecRegistry,
reactor.core.publisher.FluxSink<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,
Object msg) |
protected NettyWebSocketSession |
createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
Subclasses should implement to create the actual
NettyWebSocketSession . |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
Argument<?> |
getBodyArgument() |
Argument<?> |
getPongArgument() |
NettyWebSocketSession |
getSession() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
callOpenMethod, 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, reactor.core.publisher.FluxSink<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, Object evt) throws Exception
userEventTriggered
in interface io.netty.channel.ChannelInboundHandler
userEventTriggered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public Argument<?> getBodyArgument()
getBodyArgument
in class AbstractNettyWebSocketHandler
public Argument<?> getPongArgument()
getPongArgument
in class AbstractNettyWebSocketHandler
public NettyWebSocketSession 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, Object msg)
channelRead0
in class AbstractNettyWebSocketHandler
protected NettyWebSocketSession createWebSocketSession(io.netty.channel.ChannelHandlerContext ctx)
AbstractNettyWebSocketHandler
NettyWebSocketSession
.createWebSocketSession
in class AbstractNettyWebSocketHandler
ctx
- The contextpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class AbstractNettyWebSocketHandler