public interface BroadcastService
The broadcast service is an unreliable broadcast messaging service backed by multicast. This service provides no guaranteed regarding reliability or order of messages.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BroadcastService.Builder
Broadcast service builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(String subject,
Consumer<byte[]> listener)
Adds a broadcast listener for the given subject.
|
void |
broadcast(String subject,
byte[] message)
Broadcasts the given message to all listeners for the given subject.
|
void |
removeListener(String subject,
Consumer<byte[]> listener)
Removes a broadcast listener for the given subject.
|
void broadcast(String subject, byte[] message)
The message will be broadcast to all listeners for the given subject. This service makes no guarantee
regarding the reliability or order of delivery of the message.
subject - the message subjectmessage - the message to broadcastvoid addListener(String subject, Consumer<byte[]> listener)
Messages broadcast to the given subject will be delivered to the provided listener. This service provides
no guarantee regarding the order in which messages arrive.
subject - the message subjectlistener - the broadcast listener to addCopyright © 2013–2018. All rights reserved.