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 TypeMethodDescriptionbinary()
Returns the message payload binary data stream.frames()
Returns the frames that composes the message.getKind()
Returns the WebSocket message type.Returns the message payload binary data.Returns the message payload text data stream.text()
Returns the message payload text 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()
,binary()
,reducedBinary()
,text()
orreducedText()
.- Returns:
- a WebSocker frames publisher
-
binary
Returns the message payload binary data stream.
Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by
frames()
,binary()
,reducedBinary()
,text()
orreducedText()
.- Returns:
- a data publisher
-
reducedBinary
Returns the message payload binary data.
This method basically reduces the result of
binary()
.Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by
frames()
,binary()
,reducedBinary()
,text()
orreducedText()
.- Returns:
- a mono emitting the binary payload
-
text
Returns the message payload text data stream.
Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by
frames()
,binary()
,reducedBinary()
,text()
orreducedText()
.- Returns:
- a text publisher
-
reducedText
Returns the message payload text data stream.
This method basically reduces the result of
text()
.Note that the returned publisher is exclusive: it is only possible to subscribe to one of the publisher returned by
frames()
,binary()
,reducedBinary()
,text()
orreducedText()
.- Returns:
- a mono emitting the text payload
-