public interface WebSocketBroadcaster
Modifier and Type | Method and Description |
---|---|
default <T> Publisher<T> |
broadcast(T message)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> Publisher<T> |
broadcast(T message,
MediaType mediaType)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
<T> Publisher<T> |
broadcast(T message,
MediaType mediaType,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections that match the given filter.
|
default <T> Publisher<T> |
broadcast(T message,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections that match the given filter.
|
default <T> CompletableFuture<T> |
broadcastAsync(T message)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> CompletableFuture<T> |
broadcastAsync(T message,
MediaType mediaType)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> CompletableFuture<T> |
broadcastAsync(T message,
MediaType mediaType,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> CompletableFuture<T> |
broadcastAsync(T message,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections that match the given filter.
|
default <T> void |
broadcastSync(T message)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> void |
broadcastSync(T message,
MediaType mediaType)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> void |
broadcastSync(T message,
MediaType mediaType,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections.
|
default <T> void |
broadcastSync(T message,
Predicate<WebSocketSession> filter)
When used on the server this method will broadcast a message to all open WebSocket connections that match the given filter.
|
<T> Publisher<T> broadcast(T message, MediaType mediaType, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.filter
- The filter to applyPublisher
that either emits an error or emits the message once it has been published successfully.default <T> Publisher<T> broadcast(T message, MediaType mediaType)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.Publisher
that either emits an error or emits the message once it has been published successfully.default <T> Publisher<T> broadcast(T message)
T
- The message typemessage
- The messagePublisher
that either emits an error or emits the message once it has been published successfully.default <T> Publisher<T> broadcast(T message, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagefilter
- The filter to applyPublisher
that either emits an error or emits the message once it has been published successfully.default <T> CompletableFuture<T> broadcastAsync(T message, MediaType mediaType, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.filter
- The filterPublisher
that either emits an error or emits the message once it has been published successfully.default <T> CompletableFuture<T> broadcastAsync(T message)
T
- The message typemessage
- The messagePublisher
that either emits an error or emits the message once it has been published successfully.default <T> CompletableFuture<T> broadcastAsync(T message, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagefilter
- The filter to applyPublisher
that either emits an error or emits the message once it has been published successfully.default <T> CompletableFuture<T> broadcastAsync(T message, MediaType mediaType)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.Publisher
that either emits an error or emits the message once it has been published successfully.default <T> void broadcastSync(T message, MediaType mediaType, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.filter
- The filterdefault <T> void broadcastSync(T message)
T
- The message typemessage
- The messagedefault <T> void broadcastSync(T message, Predicate<WebSocketSession> filter)
T
- The message typemessage
- The messagefilter
- The filter to applydefault <T> void broadcastSync(T message, MediaType mediaType)
T
- The message typemessage
- The messagemediaType
- The media type of the message. Used to lookup an appropriate codec via the MediaTypeCodecRegistry
.