Package com.couchbase.client.core.event
Class DefaultEventBus
- java.lang.Object
-
- com.couchbase.client.core.event.DefaultEventBus
-
-
Constructor Summary
Constructors Constructor Description DefaultEventBus(rx.Scheduler scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<CouchbaseEvent>
get()
Subscribe to the event bus to retrieveCouchbaseEvent
s.boolean
hasSubscribers()
Checks if the event bus has subscribers.void
publish(CouchbaseEvent event)
Publish aCouchbaseEvent
into the bus.
-
-
-
Method Detail
-
get
public rx.Observable<CouchbaseEvent> get()
Description copied from interface:EventBus
Subscribe to the event bus to retrieveCouchbaseEvent
s.
-
publish
public void publish(CouchbaseEvent event)
Description copied from interface:EventBus
Publish aCouchbaseEvent
into the bus.
-
hasSubscribers
public boolean hasSubscribers()
Description copied from interface: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.- Specified by:
hasSubscribers
in interfaceEventBus
- Returns:
- true if it has subscribers, false otherwise.
-
-