Interface BaseWebSocketExchange.Inbound
- Enclosing interface:
BaseWebSocketExchange<A extends ExchangeContext>
Represents the inbound part of a WebSocket exchange.
It exposes the frames or messages received by the server from the client or by the client from the server. 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 received binary messages.org.reactivestreams.Publisher<WebSocketFrame> frames()Returns the received frames.org.reactivestreams.Publisher<WebSocketMessage> messages()Returns the received messages.org.reactivestreams.Publisher<WebSocketMessage> Returns the received text messages.
-
Method Details
-
frames
org.reactivestreams.Publisher<WebSocketFrame> frames()Returns the received frames.
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 received messages.
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 received text messages.
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 received binary messages.
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
-