Interface WebSocketMessage


public interface WebSocketMessage

Represents a WebSocket message which can be fragmented into multiple data frames as defined by RFC 6455 Section 5.4.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • getKind

      Returns the WebSocket message type.

      Returns:
      a WebSocket message type
    • frames

      Returns the frames that composes the message.

      Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by frames() , raw(), rawReduced(), string() or stringReduced().

      Returns:
      a WebSocket frames publisher
    • raw

      Returns the message payload raw data stream.

      Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by frames(), raw() , rawReduced(), string() or stringReduced().

      Returns:
      a data publisher
    • rawReduced

      Mono<ByteBuf> rawReduced()

      Returns the message payload reduced raw data.

      This method basically reduces the result of raw().

      Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by frames(), raw(), rawReduced() , string() or stringReduced().

      Returns:
      a mono emitting the binary payload
    • string

      Publisher<String> string()

      Returns the message payload string data stream.

      Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by frames(), raw(), rawReduced(), string() or stringReduced().

      Returns:
      a text publisher
    • stringReduced

      Mono<String> stringReduced()

      Returns the message payload reduced string data stream.

      This method basically reduces the result of string().

      Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by frames(), raw(), rawReduced(), string() or stringReduced() .

      Returns:
      a mono emitting the text payload