Class DefaultEventBus

  • All Implemented Interfaces:
    EventBus

    public class DefaultEventBus
    extends Object
    implements EventBus
    The default event bus implementation.
    Since:
    1.1.0
    Author:
    Michael Nitschinger
    • Constructor Detail

      • DefaultEventBus

        public DefaultEventBus​(rx.Scheduler scheduler)
    • Method Detail

      • get

        public rx.Observable<CouchbaseEvent> get()
        Description copied from interface: EventBus
        Subscribe to the event bus to retrieve CouchbaseEvents.
        Specified by:
        get in interface EventBus
        Returns:
        the observable where the events are emitted into.
      • 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 interface EventBus
        Returns:
        true if it has subscribers, false otherwise.