public interface EventBus
Defines the interface for a generic event bus.
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. |
rx.Observable<CouchbaseEvent> get()
Subscribe to the event bus to retrieve CouchbaseEvent
s.
void publish(CouchbaseEvent event)
Publish a CouchbaseEvent
into the bus.
event
- the event to publish.boolean hasSubscribers()
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.
Copyright © 2017 Couchbase, Inc.. All rights reserved.