public class RxNettyWebSocketSession extends NettyWebSocketSessionSupport<WebSocketConnection>
WebSocketSession
implementation that adapts to the RxNetty
io.reactivex.netty.protocol.http.ws.WebSocketConnection
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FRAME_AGGREGATOR_NAME
The
ChannelHandler name to use when inserting a
WebSocketFrameAggregator in the channel pipeline. |
DEFAULT_FRAME_MAX_SIZE
Constructor and Description |
---|
RxNettyWebSocketSession(WebSocketConnection conn,
HandshakeInfo info,
NettyDataBufferFactory factory) |
Modifier and Type | Method and Description |
---|---|
RxNettyWebSocketSession |
aggregateFrames(Channel channel,
java.lang.String frameDecoderName)
Insert an
WebSocketFrameAggregator after the
WebSocketFrameDecoder for receiving full messages. |
<any> |
close(CloseStatus status)
Close the WebSocket session with the given status.
|
<any> |
receive()
Get the flux of incoming messages.
|
<any> |
send(<any> messages)
Write the given messages to the WebSocket connection.
|
bufferFactory, toFrame, toMessage
binaryMessage, getDelegate, getHandshakeInfo, getId, pingMessage, pongMessage, textMessage, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close
public static final java.lang.String FRAME_AGGREGATOR_NAME
ChannelHandler
name to use when inserting a
WebSocketFrameAggregator
in the channel pipeline.public RxNettyWebSocketSession(WebSocketConnection conn, HandshakeInfo info, NettyDataBufferFactory factory)
public RxNettyWebSocketSession aggregateFrames(Channel channel, java.lang.String frameDecoderName)
WebSocketFrameAggregator
after the
WebSocketFrameDecoder
for receiving full messages.channel
- the channel for the sessionframeDecoderName
- the name of the WebSocketFrame decoderpublic <any> receive()
WebSocketSession
receive
in interface WebSocketSession
receive
in class AbstractWebSocketSession<WebSocketConnection>
public <any> send(<any> messages)
WebSocketSession
send
in interface WebSocketSession
send
in class AbstractWebSocketSession<WebSocketConnection>
messages
- the messages to writepublic <any> close(CloseStatus status)
WebSocketSession
status
- the close status