Class UndertowWebSocketSession

java.lang.Object
org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession<T>
org.springframework.web.reactive.socket.adapter.AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
org.springframework.web.reactive.socket.adapter.UndertowWebSocketSession
All Implemented Interfaces:
Subscriber<Void>, WebSocketSession

@Deprecated(since="6.2.18", forRemoval=true) public class UndertowWebSocketSession extends AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.2.18 with no replacement
Spring WebSocketSession implementation that adapts to an Undertow WebSocketChannel.
Since:
5.0
Author:
Violeta Georgieva, Rossen Stoyanchev
  • Constructor Details

    • UndertowWebSocketSession

      public UndertowWebSocketSession(io.undertow.websockets.core.WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • UndertowWebSocketSession

      public UndertowWebSocketSession(io.undertow.websockets.core.WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory, @Nullable reactor.core.publisher.Sinks.Empty<Void> completionSink)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • canSuspendReceiving

      protected boolean canSuspendReceiving()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractListenerWebSocketSession
      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.

      Specified by:
      canSuspendReceiving in class AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
    • suspendReceiving

      protected void suspendReceiving()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractListenerWebSocketSession
      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 AbstractListenerWebSocketSession.canSuspendReceiving() should return false.

      Specified by:
      suspendReceiving in class AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
    • resumeReceiving

      protected void resumeReceiving()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractListenerWebSocketSession
      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 AbstractListenerWebSocketSession.canSuspendReceiving() should return false.

      Specified by:
      resumeReceiving in class AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
    • sendMessage

      protected boolean sendMessage(WebSocketMessage message) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractListenerWebSocketSession
      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.

      Specified by:
      sendMessage in class AbstractListenerWebSocketSession<io.undertow.websockets.core.WebSocketChannel>
      Throws:
      IOException
    • isOpen

      public boolean isOpen()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketSession
      Whether the underlying connection is open.
    • close

      public reactor.core.publisher.Mono<Void> close(CloseStatus status)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketSession
      Close the WebSocket session with the given status.
      Parameters:
      status - the close status