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(java.lang.String subject,
java.util.function.Consumer<byte[]> listener)
Adds a broadcast listener for the given subject.
|
void |
broadcast(java.lang.String subject,
byte[] message)
Broadcasts the given message to all listeners for the given subject.
|
void |
removeListener(java.lang.String subject,
java.util.function.Consumer<byte[]> listener)
Removes a broadcast listener for the given subject.
|
void broadcast(java.lang.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(java.lang.String subject,
java.util.function.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 addvoid removeListener(java.lang.String subject,
java.util.function.Consumer<byte[]> listener)
subject - the message subjectlistener - the broadcast listener to removeCopyright © 2013-2019. All Rights Reserved.