Interface Web2SocketExchange.Outbound
- All Superinterfaces:
BaseWebSocketExchange.Outbound
- Enclosing interface:
Web2SocketExchange<A extends ExchangeContext>
Extends BaseWebSocketExchange.Outbound
to support WebSocket message encoding.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> void
encodeBinaryMessages
(Publisher<T> messages) Encodes the specified messages to WebSocket binary messages sent to the client.default <T> void
encodeBinaryMessages
(Publisher<T> messages, Class<T> type) Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.<T> void
encodeBinaryMessages
(Publisher<T> messages, Type type) Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.default <T> void
encodeTextMessages
(Publisher<T> messages) Encodes the specified messages to WebSocket text messages sent to the client.default <T> void
encodeTextMessages
(Publisher<T> messages, Class<T> type) Encodes the specified messages of the specified type to WebSocket text messages sent to the client.<T> void
encodeTextMessages
(Publisher<T> messages, Type type) Encodes the specified messages of the specified type to WebSocket text messages sent to the client.Methods inherited from interface io.inverno.mod.http.base.ws.BaseWebSocketExchange.Outbound
closeOnComplete, frames, messages
-
Method Details
-
encodeTextMessages
Encodes the specified messages to WebSocket text messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to send
-
encodeTextMessages
Encodes the specified messages of the specified type to WebSocket text messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to sendtype
- the type of message to encode
-
encodeTextMessages
Encodes the specified messages of the specified type to WebSocket text messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to sendtype
- the type of message to encode
-
encodeBinaryMessages
Encodes the specified messages to WebSocket binary messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to send
-
encodeBinaryMessages
Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to sendtype
- the type of message to encode
-
encodeBinaryMessages
Encodes the specified messages of the specified type to WebSocket binary messages sent to the client.
The negociated subprotocol shall be used to determine the converter to use to encode the message, the subprotocol is then assumed to be a compact application media type (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).- Type Parameters:
T
- the type of message to encode- Parameters:
messages
- the messages to sendtype
- the type of message to encode
-