Interface BaseWebSocketExchange.Inbound

All Known Subinterfaces:
Web2SocketExchange.Inbound
Enclosing interface:
BaseWebSocketExchange<A extends ExchangeContext>

public static interface BaseWebSocketExchange.Inbound

Represents the inbound part of a WebSocket exchange.

It exposes the frames or messages received by the server from the client or by the client from the server. It is only possible to subscribe to one of the exposed publishers, subscribing to both frames and messages will result in an IllegalStateException.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • frames

      Returns the received frames.

      Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.

      Returns:
      a publisher of WebSocket frames
    • messages

      Returns the received messages.

      Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.

      Returns:
      a publisher of WebSocket messages
    • textMessages

      Publisher<WebSocketMessage> textMessages()

      Returns the received text messages.

      Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.

      The resulting publisher filters out any received message that is not a text message.

      Returns:
      a publisher of WebSocket text messages
    • binaryMessages

      Publisher<WebSocketMessage> binaryMessages()

      Returns the received binary messages.

      Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.

      The resulting publisher filters out any received message that is not a binary message.

      Returns:
      a publisher of WebSocket binary messages