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
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A factory used to create WebSocket message.static enum
WebSocket message type. -
Method Summary
Modifier and TypeMethodDescriptionframes()
Returns the frames that composes the message.getKind()
Returns the WebSocket message type.raw()
Returns the message payload raw data stream.Returns the message payload reduced raw data.string()
Returns the message payload string data stream.Returns the message payload reduced string data stream.
-
Method Details
-
getKind
WebSocketMessage.Kind getKind()Returns the WebSocket message type.
- Returns:
- a WebSocket message type
-
frames
Publisher<WebSocketFrame> 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()
orstringReduced()
.- 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()
orstringReduced()
.- Returns:
- a data publisher
-
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()
orstringReduced()
.- Returns:
- a mono emitting the binary payload
-
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()
orstringReduced()
.- Returns:
- a text publisher
-
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()
orstringReduced()
.- Returns:
- a mono emitting the text payload
-