Class ReactorNetty2WebSocketSession

All Implemented Interfaces:
WebSocketSession

@Deprecated(since="6.2.18", forRemoval=true) public class ReactorNetty2WebSocketSession extends Netty5WebSocketSessionSupport<ReactorNetty2WebSocketSession.WebSocketConnection>
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.2.18 with no replacement
WebSocketSession implementation for use with the Reactor Netty's (Netty 5) NettyInbound and NettyOutbound. This class is based on ReactorNettyWebSocketSession.
Since:
6.0
Author:
Violeta Georgieva
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    as of 6.2.18 with no replacement
  • Field Summary

    Fields inherited from class org.springframework.web.reactive.socket.adapter.Netty5WebSocketSessionSupport

    DEFAULT_FRAME_MAX_SIZE

    Fields inherited from class org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReactorNetty2WebSocketSession(reactor.netty5.http.websocket.WebsocketInbound inbound, reactor.netty5.http.websocket.WebsocketOutbound outbound, HandshakeInfo info, org.springframework.core.io.buffer.Netty5DataBufferFactory bufferFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor for the session, using the Netty5WebSocketSessionSupport.DEFAULT_FRAME_MAX_SIZE value.
    ReactorNetty2WebSocketSession(reactor.netty5.http.websocket.WebsocketInbound inbound, reactor.netty5.http.websocket.WebsocketOutbound outbound, HandshakeInfo info, org.springframework.core.io.buffer.Netty5DataBufferFactory bufferFactory, int maxFramePayloadLength)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor with an additional maxFramePayloadLength argument.
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<Void>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close the WebSocket session with the given status.
    reactor.core.publisher.Mono<CloseStatus>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Provides access to the CloseStatus with which the session is closed either locally or remotely, or completes empty if the session ended without a status.
    io.netty5.channel.ChannelId
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the id of the underlying Netty channel.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Whether the underlying connection is open.
    reactor.core.publisher.Flux<WebSocketMessage>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Provides access to the stream of inbound messages.
    reactor.core.publisher.Mono<Void>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Give a source of outgoing messages, write the messages and return a Mono<Void> that completes when the source completes and writing is done.

    Methods inherited from class org.springframework.web.reactive.socket.adapter.Netty5WebSocketSessionSupport

    bufferFactory, toFrame, toMessage

    Methods inherited from class org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession

    binaryMessage, getAttributes, getDelegate, getHandshakeInfo, getId, getLogPrefix, pingMessage, pongMessage, textMessage, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.web.reactive.socket.WebSocketSession

    close
  • Constructor Details

    • ReactorNetty2WebSocketSession

      public ReactorNetty2WebSocketSession(reactor.netty5.http.websocket.WebsocketInbound inbound, reactor.netty5.http.websocket.WebsocketOutbound outbound, HandshakeInfo info, org.springframework.core.io.buffer.Netty5DataBufferFactory bufferFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor for the session, using the Netty5WebSocketSessionSupport.DEFAULT_FRAME_MAX_SIZE value.
    • ReactorNetty2WebSocketSession

      public ReactorNetty2WebSocketSession(reactor.netty5.http.websocket.WebsocketInbound inbound, reactor.netty5.http.websocket.WebsocketOutbound outbound, HandshakeInfo info, org.springframework.core.io.buffer.Netty5DataBufferFactory bufferFactory, int maxFramePayloadLength)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor with an additional maxFramePayloadLength argument.
      Since:
      5.1
  • Method Details

    • getChannelId

      public io.netty5.channel.ChannelId getChannelId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the id of the underlying Netty channel.
      Since:
      5.3.4
    • receive

      public reactor.core.publisher.Flux<WebSocketMessage> receive()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketSession
      Provides access to the stream of inbound messages.

      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.

      Specified by:
      receive in interface WebSocketSession
      Specified by:
      receive in class AbstractWebSocketSession<ReactorNetty2WebSocketSession.WebSocketConnection>
    • send

      public reactor.core.publisher.Mono<Void> send(Publisher<WebSocketMessage> messages)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketSession
      Give a source of outgoing messages, write the messages and return a 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.

      Specified by:
      send in interface WebSocketSession
      Specified by:
      send in class AbstractWebSocketSession<ReactorNetty2WebSocketSession.WebSocketConnection>
    • 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
    • closeStatus

      public reactor.core.publisher.Mono<CloseStatus> closeStatus()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketSession
      Provides access to the CloseStatus with which the session is closed either locally or remotely, or completes empty if the session ended without a status.