public class ReactorNettyWebSocketSession extends NettyWebSocketSessionSupport<ReactorNettyWebSocketSession.WebSocketConnection>
Modifier and Type | Class and Description |
---|---|
static class |
ReactorNettyWebSocketSession.WebSocketConnection
Simple container for
NettyInbound and NettyOutbound . |
Modifier and Type | Field and Description |
---|---|
private int |
maxFramePayloadLength |
DEFAULT_FRAME_MAX_SIZE
logger
Constructor and Description |
---|
ReactorNettyWebSocketSession(WebsocketInbound inbound,
WebsocketOutbound outbound,
HandshakeInfo info,
NettyDataBufferFactory bufferFactory)
Constructor for the session, using the
NettyWebSocketSessionSupport.DEFAULT_FRAME_MAX_SIZE value. |
ReactorNettyWebSocketSession(WebsocketInbound inbound,
WebsocketOutbound outbound,
HandshakeInfo info,
NettyDataBufferFactory bufferFactory,
int maxFramePayloadLength)
Constructor with an additional maxFramePayloadLength argument.
|
Modifier and Type | Method and Description |
---|---|
<any> |
close(CloseStatus status)
Close the WebSocket session with the given status.
|
<any> |
receive()
Provides access to the stream of inbound messages.
|
<any> |
send(<any> messages)
Give a source of outgoing messages, write the messages and return a
Mono<Void> that completes when the source completes and writing
is done. |
bufferFactory, toFrame, toMessage
binaryMessage, getAttributes, getDelegate, getHandshakeInfo, getId, getLogPrefix, pingMessage, pongMessage, textMessage, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close
public ReactorNettyWebSocketSession(WebsocketInbound inbound, WebsocketOutbound outbound, HandshakeInfo info, NettyDataBufferFactory bufferFactory)
NettyWebSocketSessionSupport.DEFAULT_FRAME_MAX_SIZE
value.public ReactorNettyWebSocketSession(WebsocketInbound inbound, WebsocketOutbound outbound, HandshakeInfo info, NettyDataBufferFactory bufferFactory, int maxFramePayloadLength)
public <any> receive()
WebSocketSession
This stream receives a completion or error signal when the connection
is closed. In a typical WebSocketHandler
implementation this
stream is composed into the overall processing flow, so that when the
connection is closed, handling will end.
See the class-level doc of WebSocketHandler
and the reference
for more details and examples of how to handle the session.
receive
in interface WebSocketSession
receive
in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>
public <any> send(<any> messages)
WebSocketSession
Mono<Void>
that completes when the source completes and writing
is done.
See the class-level doc of WebSocketHandler
and the reference
for more details and examples of how to handle the session.
send
in interface WebSocketSession
send
in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>
public <any> close(CloseStatus status)
WebSocketSession
status
- the close status