Class CompletableAndThenPublisher.AndThenPublisherSubscriber<R>

java.lang.Object
java.util.concurrent.atomic.AtomicReference<org.reactivestreams.Subscription>
io.reactivex.rxjava3.internal.operators.mixed.CompletableAndThenPublisher.AndThenPublisherSubscriber<R>
All Implemented Interfaces:
CompletableObserver, FlowableSubscriber<R>, Serializable, org.reactivestreams.Subscriber<R>, org.reactivestreams.Subscription
Enclosing class:
CompletableAndThenPublisher<R>

static final class CompletableAndThenPublisher.AndThenPublisherSubscriber<R> extends AtomicReference<org.reactivestreams.Subscription> implements FlowableSubscriber<R>, CompletableObserver, org.reactivestreams.Subscription
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • downstream

      final org.reactivestreams.Subscriber<? super R> downstream
    • other

      org.reactivestreams.Publisher<? extends R> other
    • upstream

      Disposable upstream
    • requested

      final AtomicLong requested
  • Constructor Details

    • AndThenPublisherSubscriber

      AndThenPublisherSubscriber(org.reactivestreams.Subscriber<? super R> downstream, org.reactivestreams.Publisher<? extends R> other)
  • Method Details

    • onNext

      public void onNext(R t)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<R>
    • onError

      public void onError(Throwable t)
      Description copied from interface: CompletableObserver
      Called once if the deferred computation 'throws' an exception.
      Specified by:
      onError in interface CompletableObserver
      Specified by:
      onError in interface org.reactivestreams.Subscriber<R>
      Parameters:
      t - the exception, not null.
    • onComplete

      public void onComplete()
      Description copied from interface: CompletableObserver
      Called once the deferred computation completes normally.
      Specified by:
      onComplete in interface CompletableObserver
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<R>
    • 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
    • onSubscribe

      public void onSubscribe(Disposable d)
      Description copied from interface: CompletableObserver
      Called once by the Completable to set a Disposable on this instance which then can be used to cancel the subscription at any time.
      Specified by:
      onSubscribe in interface CompletableObserver
      Parameters:
      d - the Disposable instance to call dispose on for cancellation, not null
    • 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<R>
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<R>