Top Description Methods
org.glassfish.grizzly.websockets

public Interface Broadcaster

Known Direct Implementers
org.glassfish.grizzly.websockets.DummyBroadcaster, org.glassfish.grizzly.websockets.OptimizedBroadcaster

General Broadcaster API to send the same message to a set of clients.
Author
Alexey Stashok

Method Summary

Modifier and TypeMethod and Description
public void
broadcast(final Iterable<? extends WebSocket>
the recipients of the provided text content.
recipients
,
final String
textual content.
text
)

Broadcasts the provided text content to the specified recipients.

public void
broadcast(final Iterable<? extends WebSocket>
the recipients of the provided binary content.
recipients
,
final byte[]
binary content.
binary
)

Broadcasts the provided binary content to the specified recipients.

public void
broadcastFragment(final Iterable<? extends WebSocket>
the recipients of the provided fragmented text content.
recipients
,
final String
fragmented textual content.
text
,
final boolean
true if this is the last fragment, otherwise false.
last
)

Broadcasts the provided fragmented text content to the specified recipients.

public void
broadcastFragment(final Iterable<? extends WebSocket>
the recipients of the provided fragmented binary content.
recipients
,
final byte[]
fragmented binary content.
binary
,
final boolean
true if this is the last fragment, otherwise false.
last
)

Broadcasts the provided fragmented binary content to the specified recipients.

Method Detail

broadcastback to summary
public void broadcast(final Iterable<? extends WebSocket> recipients, final String text)

Broadcasts the provided text content to the specified recipients.

Parameters
recipients:Iterable<? extends WebSocket>

the recipients of the provided text content.

text:String

textual content.

broadcastback to summary
public void broadcast(final Iterable<? extends WebSocket> recipients, final byte[] binary)

Broadcasts the provided binary content to the specified recipients.

Parameters
recipients:Iterable<? extends WebSocket>

the recipients of the provided binary content.

binary:byte[]

binary content.

broadcastFragmentback to summary
public void broadcastFragment(final Iterable<? extends WebSocket> recipients, final String text, final boolean last)

Broadcasts the provided fragmented text content to the specified recipients.

Parameters
recipients:Iterable<? extends WebSocket>

the recipients of the provided fragmented text content.

text:String

fragmented textual content.

last:boolean

true if this is the last fragment, otherwise false.

broadcastFragmentback to summary
public void broadcastFragment(final Iterable<? extends WebSocket> recipients, final byte[] binary, final boolean last)

Broadcasts the provided fragmented binary content to the specified recipients.

Parameters
recipients:Iterable<? extends WebSocket>

the recipients of the provided fragmented binary content.

binary:byte[]

fragmented binary content.

last:boolean

true if this is the last fragment, otherwise false.