WebSocketSession implementation that adapts to an Undertow
io.undertow.websockets.core.WebSocketChannel .
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory, Sinks.
|
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | canSuspendReceiving()
Implements abstract org. Whether the underlying WebSocket API has flow control and can suspend and resume the receiving of messages. |
| public Mono | close(CloseStatus
the close status status)Implements org. Close the WebSocket session with the given status. |
| public boolean | isOpen()
Implements org. Whether the underlying connection is open. |
| protected void | resumeReceiving()
Implements abstract org. Resume receiving new message(s) after demand is generated by the downstream Subscriber. |
| protected boolean | sendMessage(WebSocketMessage message)
Implements abstract org. Send the given WebSocket message. |
| protected void | suspendReceiving()
Implements abstract org. Suspend receiving until received message(s) are processed and more demand is generated by the downstream Subscriber. |
| UndertowWebSocketSession | back to summary |
|---|---|
| public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory) | |
| UndertowWebSocketSession | back to summary |
|---|---|
| public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory, Sinks. | |
| canSuspendReceiving | back to summary |
|---|---|
| protected boolean canSuspendReceiving() Implements abstract org. Doc from org. Whether the underlying WebSocket API has flow control and can suspend and resume the receiving of messages. Note Sub-classes are encouraged to start out in suspended mode, if possible, and wait until demand is received.
| |
| close | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Close the WebSocket session with the given status.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements org. Doc from org. Whether the underlying connection is open.
| |
| resumeReceiving | back to summary |
|---|---|
| protected void resumeReceiving() Implements abstract org. Doc from org. Resume receiving new message(s) after demand is generated by the downstream Subscriber. Note if the underlying WebSocket API does not provide
flow control for receiving messages, this method should be a no-op
and
| |
| sendMessage | back to summary |
|---|---|
| protected boolean sendMessage(WebSocketMessage message) throws IOException Implements abstract org. Doc from org. Send the given WebSocket message. Note Sub-classes are responsible for releasing the payload data buffer, once fully written, if pooled buffers apply to the underlying container.
| |
| suspendReceiving | back to summary |
|---|---|
| protected void suspendReceiving() Implements abstract org. Doc from org. Suspend receiving until received message(s) are processed and more demand is generated by the downstream Subscriber. Note if the underlying WebSocket API does not provide
flow control for receiving messages, this method should be a no-op
and
| |
| Modifier and Type | Field and Description |
|---|---|
| private final DataBuffer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | complete(WebSocketChannel channel, Void context)
Implements io.
|
| public void | onError(WebSocketChannel channel, Void context, Throwable throwable)
Implements io.
|
| payload | back to summary |
|---|---|
| private final DataBuffer payload | |
| SendProcessorCallback | back to summary |
|---|---|
| pack-priv SendProcessorCallback(DataBuffer payload) | |
| complete | back to summary |
|---|---|
| public void complete(WebSocketChannel channel, Void context) Implements io.
| |
| onError | back to summary |
|---|---|
| public void onError(WebSocketChannel channel, Void context, Throwable throwable) Implements io.
| |