public class ReactorNettyWebSocketSession extends NettyWebSocketSessionSupport<ReactorNettyWebSocketSession.WebSocketConnection>
| Modifier and Type | Class and Description |
|---|---|
static class |
ReactorNettyWebSocketSession.WebSocketConnection
Simple container for
NettyInbound and NettyOutbound. |
DEFAULT_FRAME_MAX_SIZE| Constructor and Description |
|---|
ReactorNettyWebSocketSession(reactor.ipc.netty.http.websocket.WebsocketInbound inbound,
reactor.ipc.netty.http.websocket.WebsocketOutbound outbound,
HandshakeInfo info,
NettyDataBufferFactory bufferFactory) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
close(CloseStatus status)
Close the WebSocket session with the given status.
|
reactor.core.publisher.Flux<WebSocketMessage> |
receive()
Provides access to the stream of inbound messages.
|
reactor.core.publisher.Mono<Void> |
send(org.reactivestreams.Publisher<WebSocketMessage> 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, toMessagebinaryMessage, getDelegate, getHandshakeInfo, getId, pingMessage, pongMessage, textMessage, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclosepublic ReactorNettyWebSocketSession(reactor.ipc.netty.http.websocket.WebsocketInbound inbound,
reactor.ipc.netty.http.websocket.WebsocketOutbound outbound,
HandshakeInfo info,
NettyDataBufferFactory bufferFactory)
public reactor.core.publisher.Flux<WebSocketMessage> receive()
WebSocketSessionThis 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 WebSocketSessionreceive in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>public reactor.core.publisher.Mono<Void> send(org.reactivestreams.Publisher<WebSocketMessage> messages)
WebSocketSessionMono<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 WebSocketSessionsend in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>public reactor.core.publisher.Mono<Void> close(CloseStatus status)
WebSocketSessionstatus - the close status