public class DummyBroadcaster extends Object implements Broadcaster
Broadcaster
, which iterates over set of clients and sends
the same text of binary message separately to each client.
So the text/binary -> websocket-frame transformation is being done for
each client separately.Constructor and Description |
---|
DummyBroadcaster() |
Modifier and Type | Method and Description |
---|---|
void |
broadcast(Iterable<? extends WebSocket> recipients,
byte[] binary)
Broadcasts the provided binary content to the specified recipients.
|
void |
broadcast(Iterable<? extends WebSocket> recipients,
String text)
Broadcasts the provided text content to the specified recipients.
|
void |
broadcastFragment(Iterable<? extends WebSocket> recipients,
byte[] binary,
boolean last)
Broadcasts the provided fragmented binary content to the specified recipients.
|
void |
broadcastFragment(Iterable<? extends WebSocket> recipients,
String text,
boolean last)
Broadcasts the provided fragmented text content to the specified recipients.
|
public void broadcast(Iterable<? extends WebSocket> recipients, String text)
broadcast
in interface Broadcaster
recipients
- the recipients of the provided text content.text
- textual content.public void broadcast(Iterable<? extends WebSocket> recipients, byte[] binary)
broadcast
in interface Broadcaster
recipients
- the recipients of the provided binary content.binary
- binary content.public void broadcastFragment(Iterable<? extends WebSocket> recipients, String text, boolean last)
broadcastFragment
in interface Broadcaster
recipients
- the recipients of the provided fragmented text content.text
- fragmented textual content.last
- true if this is the last fragment, otherwise false.public void broadcastFragment(Iterable<? extends WebSocket> recipients, byte[] binary, boolean last)
broadcastFragment
in interface Broadcaster
recipients
- the recipients of the provided fragmented binary content.binary
- fragmented binary content.last
- true if this is the last fragment, otherwise false.Copyright © 2015 Oracle Corporation. All rights reserved.