Package 

Class SerializedSubscriber

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

    
    public class SerializedSubscriber<T>
    extends Subscriber<T>
                        
    • Method Summary

      Modifier and Type Method Description
      void onCompleted() Notifies the Subscriber that the {@code Observable} has finished sending push-based notifications.
      void onError(Throwable e) Notifies the Subscriber that the {@code Observable} has experienced an error condition.
      void onNext(T t) Provides the Subscriber with a new item to observe.
      • Methods inherited from class com.tds.common.reactor.Subscriber

        add, isUnsubscribed, onStart, setProducer, unsubscribe
      • Methods inherited from class java.lang.Object

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

      • SerializedSubscriber

        SerializedSubscriber(Subscriber<out Object> s, boolean shareSubscriptions)
        Constructor for wrapping and serializing a subscriber optionally sharing the same underlying subscriptionlist.
        Parameters:
        s - the subscriber to wrap and serialize
        shareSubscriptions - if {@code true}, the same subscription list is shared between this subscriber and {@code s}.
    • Method Detail

      • onCompleted

         void onCompleted()

        Notifies the Subscriber that the {@code Observable} has finished sending push-based notifications.

        The {@code Observable} will not call this method if it calls onError.

      • onError

         void onError(Throwable e)

        Notifies the Subscriber that the {@code Observable} has experienced an error condition.

        If the {@code Observable} calls this method, it will not thereafter call onNext or onCompleted.

        Parameters:
        e - the exception encountered by the Observable
      • onNext

         void onNext(T t)

        Provides the Subscriber with a new item to observe.

        The {@code Observable} may call this method 0 or more times.

        The {@code Observable} will not call this method again after it calls either onCompleted or onError.

        Parameters:
        t - the item emitted by the Observable