Interface WebSocketExchange.Inbound
- Enclosing interface:
- WebSocketExchange<A extends ExchangeContext>
Represents the inbound part of a WebSocket exchange.
It exposes the frames or messages received by the server from the client. It is only possible to subscribe to one of the exposed publishers, subscribing to both frames and messages will result
in an IllegalStateException.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<WebSocketMessage>Returns the binary messages received by the server from the client.org.reactivestreams.Publisher<WebSocketFrame>frames()Returns the frames received by the server from the client.org.reactivestreams.Publisher<WebSocketMessage>messages()Returns the messages received by the server from the client.org.reactivestreams.Publisher<WebSocketMessage>Returns the text messages received by the server from the client.
-
Method Details
-
frames
org.reactivestreams.Publisher<WebSocketFrame> frames()Returns the frames received by the server from the client.
Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.
- Returns:
- a publisher of WebSocket frames
-
messages
org.reactivestreams.Publisher<WebSocketMessage> messages()Returns the messages received by the server from the client.
Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.
- Returns:
- a publisher of WebSocket messages
-
textMessages
org.reactivestreams.Publisher<WebSocketMessage> textMessages()Returns the text messages received by the server from the client.
Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.
The resulting publisher filters out any received message that is not a text message.
- Returns:
- a publisher of WebSocket text messages
-
binaryMessages
org.reactivestreams.Publisher<WebSocketMessage> binaryMessages()Returns the binary messages received by the server from the client.
Subscription to the returned publisher is exclusive, subscribing to another publisher will fail.
The resulting publisher filters out any received message that is not a binary message.
- Returns:
- a publisher of WebSocket binary messages
-