Package 

Interface Emitter

  • All Implemented Interfaces:
    com.tds.common.reactor.Observer

    
    public interface Emitter<T>
     implements Observer<T>
                        

    Abstraction over a RxJava Subscriber that allows associating a resource with it and exposes the current number of downstream requested amount.

    The onNext, onError and onCompleted methods should be called in a sequential manner, just like the Observer's methods. The other methods are thread-safe.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Emitter.BackpressureMode

      Options to handle backpressure in the emitter.

    • Method Summary

      Modifier and Type Method Description
      abstract void setSubscription(Subscription s) Sets a Subscription on this emitter; any previous Subscriptionor Cancellation will be unsubscribed/cancelled.
      abstract long requested() The current outstanding request amount.
      • Methods inherited from class com.tds.common.reactor.Observer

        onCompleted, onError, onNext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setSubscription

         abstract void setSubscription(Subscription s)

        Sets a Subscription on this emitter; any previous Subscriptionor Cancellation will be unsubscribed/cancelled.

        Parameters:
        s - the subscription, null is allowed
      • requested

         abstract long requested()

        The current outstanding request amount.

        This method it thread-safe.