Class SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T>

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicLong
io.reactivex.rxjava3.internal.operators.single.SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T>
All Implemented Interfaces:
FlowableSubscriber<T>, SingleObserver<S>, Serializable, org.reactivestreams.Subscriber<T>, org.reactivestreams.Subscription
Enclosing class:
SingleFlatMapPublisher<T,R>

static final class SingleFlatMapPublisher.SingleFlatMapPublisherObserver<S,T> extends AtomicLong implements SingleObserver<S>, FlowableSubscriber<T>, org.reactivestreams.Subscription
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • downstream

      final org.reactivestreams.Subscriber<? super T> downstream
    • mapper

      final Function<? super S,? extends org.reactivestreams.Publisher<? extends T>> mapper
    • parent

      final AtomicReference<org.reactivestreams.Subscription> parent
    • disposable

      Disposable disposable
  • Constructor Details

    • SingleFlatMapPublisherObserver

      SingleFlatMapPublisherObserver(org.reactivestreams.Subscriber<? super T> actual, Function<? super S,? extends org.reactivestreams.Publisher<? extends T>> mapper)
  • Method Details

    • onSubscribe

      public void onSubscribe(Disposable d)
      Description copied from interface: SingleObserver
      Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
      Specified by:
      onSubscribe in interface SingleObserver<S>
      Parameters:
      d - the Disposable instance whose Disposable.dispose() can be called anytime to cancel the connection
    • onSuccess

      public void onSuccess(S value)
      Description copied from interface: SingleObserver
      Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.

      The Single will not call this method if it calls SingleObserver.onError(java.lang.Throwable).

      Specified by:
      onSuccess in interface SingleObserver<S>
      Parameters:
      value - the item emitted by the Single
    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription s)
      Description copied from interface: FlowableSubscriber
      Implementors of this method should make sure everything that needs to be visible in Subscriber.onNext(Object) is established before calling Subscription.request(long). In practice this means no initialization should happen after the request() call and additional behavior is thread safe in respect to onNext.
      Specified by:
      onSubscribe in interface FlowableSubscriber<S>
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<S>
    • onNext

      public void onNext(T t)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<S>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<S>
    • onError

      public void onError(Throwable e)
      Description copied from interface: SingleObserver
      Notifies the SingleObserver that the Single has experienced an error condition.

      If the Single calls this method, it will not thereafter call SingleObserver.onSuccess(T).

      Specified by:
      onError in interface SingleObserver<S>
      Specified by:
      onError in interface org.reactivestreams.Subscriber<S>
      Parameters:
      e - the exception encountered by the Single
    • request

      public void request(long n)
      Specified by:
      request in interface org.reactivestreams.Subscription
    • cancel

      public void cancel()
      Specified by:
      cancel in interface org.reactivestreams.Subscription