Interface EventBus

  • All Known Implementing Classes:
    DefaultEventBus

    public interface EventBus
    Defines the interface for a generic event bus.
    Since:
    1.1.0
    Author:
    Michael Nitschinger
    • Method Detail

      • get

        rx.Observable<CouchbaseEvent> get()
        Subscribe to the event bus to retrieve CouchbaseEvents.
        Returns:
        the observable where the events are emitted into.
      • hasSubscribers

        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.
        Returns:
        true if it has subscribers, false otherwise.