public class ReactorNettyWebSocketSession extends NettyWebSocketSessionSupport<ReactorNettyWebSocketSession.WebSocketConnection>
WebSocketSession
implementation that adapts to Reactor Netty's
WebSocket NettyInbound
and NettyOutbound
.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<java.lang.Void> |
close(CloseStatus status)
Close the WebSocket session with the given status.
|
reactor.core.publisher.Flux<WebSocketMessage> |
receive()
Get the flux of incoming messages.
|
reactor.core.publisher.Mono<java.lang.Void> |
send(org.reactivestreams.Publisher<WebSocketMessage> 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 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()
WebSocketSession
receive
in interface WebSocketSession
receive
in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>
public reactor.core.publisher.Mono<java.lang.Void> send(org.reactivestreams.Publisher<WebSocketMessage> messages)
WebSocketSession
send
in interface WebSocketSession
send
in class AbstractWebSocketSession<ReactorNettyWebSocketSession.WebSocketConnection>
messages
- the messages to writepublic reactor.core.publisher.Mono<java.lang.Void> close(CloseStatus status)
WebSocketSession
status
- the close status