| Constructor and Description |
|---|
DefaultEventBus(Scheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
Observable<CouchbaseEvent> |
get()
Subscribe to the event bus to retrieve
CouchbaseEvents. |
boolean |
hasSubscribers()
Checks if the event bus has subscribers.
|
void |
publish(CouchbaseEvent event)
Publish a
CouchbaseEvent into the bus. |
public DefaultEventBus(Scheduler scheduler)
public Observable<CouchbaseEvent> get()
EventBusSubscribe to the event bus to retrieve CouchbaseEvents.
public void publish(CouchbaseEvent event)
EventBusPublish a CouchbaseEvent into the bus.
public boolean hasSubscribers()
EventBusChecks if the event bus has subscribers.
This method can be utilized on the publisher side to avoid complex event creation when there is no one on the other side listening and the event would be discarded immediately afterwards.
hasSubscribers in interface EventBusCopyright © 2016 Couchbase, Inc.. All rights reserved.