T
- The type of message that the BroadcastChannel publishespublic interface BroadcastChannel<T> extends Closeable
BroadcastChannel is the interface that lets you send messages to and receive messages from the other boxes in the cluster.
Modifier and Type | Field and Description |
---|---|
static String |
PUBLISH_ON_CLOSED_ERROR_MESSAGE |
Modifier and Type | Method and Description |
---|---|
rx.Observable<T> |
getNotifications()
This method returns a Hot Observable (Observable which emits events whether someone is listening or not) that
emits all the notifications passed to it by Bard instances in the cluster.
|
void |
publish(T message)
Publish is used to publish a message from a Bard box.
|
static final String PUBLISH_ON_CLOSED_ERROR_MESSAGE
void publish(T message) throws UnsupportedOperationException
message
- The message to be publishedUnsupportedOperationException
- if someone attempts to publish to the channel after it has been closedrx.Observable<T> getNotifications()
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.