@Experimental
public interface WebSocketBroadcaster
sockets.
Instances are not 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)
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 - 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 broadcasted to all socketsCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.