Constructor and Description |
---|
DefaultEventBus(rx.Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
rx.Observable<CouchbaseEvent> |
get()
Subscribe to the event bus to retrieve
CouchbaseEvent s. |
boolean |
hasSubscribers()
Checks if the event bus has subscribers.
|
void |
publish(CouchbaseEvent event)
Publish a
CouchbaseEvent into the bus. |
public rx.Observable<CouchbaseEvent> get()
EventBus
Subscribe to the event bus to retrieve CouchbaseEvent
s.
public void publish(CouchbaseEvent event)
EventBus
Publish a CouchbaseEvent
into the bus.
public boolean hasSubscribers()
EventBus
Checks 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 EventBus
Copyright © 2017 Couchbase, Inc.. All rights reserved.