Interface Web2SocketExchange.Outbound

All Superinterfaces:
BaseWebSocketExchange.Outbound
Enclosing interface:
Web2SocketExchange<A extends ExchangeContext>

public static interface Web2SocketExchange.Outbound extends BaseWebSocketExchange.Outbound

Extends BaseWebSocketExchange.Outbound to support WebSocket message encoding.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • encodeTextMessages

      default <T> void encodeTextMessages(Publisher<T> messages)

      Encodes the specified messages to WebSocket text messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
    • encodeTextMessages

      default <T> void encodeTextMessages(Publisher<T> messages, Class<T> type)

      Encodes the specified messages of the specified type to WebSocket text messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
      type - the type of message to encode
    • encodeTextMessages

      <T> void encodeTextMessages(Publisher<T> messages, Type type)

      Encodes the specified messages of the specified type to WebSocket text messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
      type - the type of message to encode
    • encodeBinaryMessages

      default <T> void encodeBinaryMessages(Publisher<T> messages)

      Encodes the specified messages to WebSocket binary messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
    • encodeBinaryMessages

      default <T> void encodeBinaryMessages(Publisher<T> messages, Class<T> type)

      Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
      type - the type of message to encode
    • encodeBinaryMessages

      <T> void encodeBinaryMessages(Publisher<T> messages, Type type)

      Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.

      The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see MediaTypes.normalizeApplicationMediaType(java.lang.String)).

      Type Parameters:
      T - the type of message to encode
      Parameters:
      messages - the messages to send
      type - the type of message to encode