@NoImplement
public interface WebSocketBroadcaster
sockets.
Instances are not to be assumed reusable.
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
broadcast(Collection<WebSocket> sockets,
org.mule.runtime.api.metadata.TypedValue<InputStream> content,
BiConsumer<WebSocket,Throwable> errorCallback)
Broadcast the
content to the given sockets. |
CompletableFuture<Void> |
broadcast(Collection<WebSocket> sockets,
org.mule.runtime.api.metadata.TypedValue<InputStream> content,
BiConsumer<WebSocket,Throwable> errorCallback,
RetryPolicyTemplate retryPolicyTemplate,
org.mule.runtime.api.scheduler.Scheduler reconnectionScheduler)
Broadcast the
content to the given sockets. |
CompletableFuture<Void> broadcast(Collection<WebSocket> sockets, org.mule.runtime.api.metadata.TypedValue<InputStream> content, BiConsumer<WebSocket,Throwable> errorCallback)
content to the given sockets.
An errorCallback is used to notify errors while broadcasting. If is communication with socket N fails, communication
with all the remaining N + M sockets will still be attempted. The callback will be invoked once per failing socket.
Sockets that are either closed or have lost connection will be discarded.
sockets - the sockets to broadcast tocontent - the content to be senterrorCallback - an error notification callback. It will be invoked once per failing socketCompletableFuture to be completed when the message has been broadcast to all socketsCompletableFuture<Void> broadcast(Collection<WebSocket> sockets, org.mule.runtime.api.metadata.TypedValue<InputStream> content, BiConsumer<WebSocket,Throwable> errorCallback, RetryPolicyTemplate retryPolicyTemplate, org.mule.runtime.api.scheduler.Scheduler reconnectionScheduler)
content to the given sockets.
An errorCallback is used to notify errors while broadcasting. If is communication with socket N fails, communication
with all the remaining N + M sockets will still be attempted. The callback will be invoked once per failing socket.
Sockets that are either closed or have lost connection will be discarded.
Socket that have lost connection to the remote system and support reconnection will be reconnected using the given
retryPolicyTemplate and reconnectionScheduler
sockets - the sockets to broadcast tocontent - the content to be senterrorCallback - an error notification callback. It will be invoked once per failing socketCompletableFuture to be completed when the message has been broadcast to all socketsCopyright © 2003–2021 MuleSoft, Inc.. All rights reserved.