Package org.glassfish.grizzly.websockets
Interface Broadcaster
- All Known Implementing Classes:
DummyBroadcaster,OptimizedBroadcaster
public interface Broadcaster
General Broadcaster API to send the same message to a set of clients.
- Author:
- Alexey Stashok
-
Method Summary
Modifier and TypeMethodDescriptionvoidBroadcasts the provided binary content to the specified recipients.voidBroadcasts the provided text content to the specified recipients.voidbroadcastFragment(Iterable<? extends WebSocket> recipients, byte[] binary, boolean last) Broadcasts the provided fragmented binary content to the specified recipients.voidbroadcastFragment(Iterable<? extends WebSocket> recipients, String text, boolean last) Broadcasts the provided fragmented text content to the specified recipients.
-
Method Details
-
broadcast
Broadcasts the provided text content to the specified recipients.- Parameters:
recipients- the recipients of the provided text content.text- textual content.
-
broadcast
Broadcasts the provided binary content to the specified recipients.- Parameters:
recipients- the recipients of the provided binary content.binary- binary content.
-
broadcastFragment
Broadcasts the provided fragmented text content to the specified recipients.- Parameters:
recipients- the recipients of the provided fragmented text content.text- fragmented textual content.last- true if this is the last fragment, otherwise false.
-
broadcastFragment
Broadcasts the provided fragmented binary content to the specified recipients.- Parameters:
recipients- the recipients of the provided fragmented binary content.binary- fragmented binary content.last- true if this is the last fragment, otherwise false.
-