Interface Web2SocketExchange.Inbound

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

public static interface Web2SocketExchange.Inbound extends BaseWebSocketExchange.Inbound

Extends BaseWebSocketExchange.Inbound to support WebSocket message decoding.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • decodeTextMessages

      default <A> Publisher<A> decodeTextMessages(Class<A> type)

      Decodes inbound text messages to the specified type.

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

      Type Parameters:
      A - the decoded message type
      Parameters:
      type - the decoded message type
      Returns:
      a publisher of decoded message
    • decodeTextMessages

      <A> Publisher<A> decodeTextMessages(Type type)

      Decodes inbound text messages to the specified type.

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

      Type Parameters:
      A - the decoded message type
      Parameters:
      type - the decoded message type
      Returns:
      a publisher of decoded message
    • decodeBinaryMessages

      default <A> Publisher<A> decodeBinaryMessages(Class<A> type)

      Decodes inbound binary messages to the specified type.

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

      Type Parameters:
      A - the decoded message type
      Parameters:
      type - the decoded message type
      Returns:
      a publisher of decoded message
    • decodeBinaryMessages

      <A> Publisher<A> decodeBinaryMessages(Type type)

      Decodes inbound binary messages to the specified type.

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

      Type Parameters:
      A - the decoded message type
      Parameters:
      type - the decoded message type
      Returns:
      a publisher of decoded message