Class ConcatMapXMainObserver<T>

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainObserver<T>
Type Parameters:
T - the upstream value type
All Implemented Interfaces:
Observer<T>, Disposable, Serializable
Direct Known Subclasses:
ObservableConcatMapCompletable.ConcatMapCompletableObserver, ObservableConcatMapMaybe.ConcatMapMaybeMainObserver, ObservableConcatMapSingle.ConcatMapSingleMainObserver

public abstract class ConcatMapXMainObserver<T> extends AtomicInteger implements Observer<T>, Disposable
Base class for implementing concatMapX main observers.
Since:
3.0.10
See Also:
  • Field Details

  • Constructor Details

    • ConcatMapXMainObserver

      public ConcatMapXMainObserver(int prefetch, ErrorMode errorMode)
  • Method Details

    • onSubscribe

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

      public final void onNext(T t)
      Description copied from interface: Observer
      Provides the Observer with a new item to observe.

      The Observable may call this method 0 or more times.

      The Observable will not call this method again after it calls either Observer.onComplete() or Observer.onError(java.lang.Throwable).

      Specified by:
      onNext in interface Observer<T>
      Parameters:
      t - the item emitted by the Observable
    • onError

      public final void onError(Throwable t)
      Description copied from interface: Observer
      Notifies the Observer that the Observable has experienced an error condition.

      If the Observable calls this method, it will not thereafter call Observer.onNext(T) or Observer.onComplete().

      Specified by:
      onError in interface Observer<T>
      Parameters:
      t - the exception encountered by the Observable
    • onComplete

      public final void onComplete()
      Description copied from interface: Observer
      Notifies the Observer that the Observable has finished sending push-based notifications.

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

      Specified by:
      onComplete in interface Observer<T>
    • dispose

      public final void dispose()
      Description copied from interface: Disposable
      Dispose the resource, the operation should be idempotent.
      Specified by:
      dispose in interface Disposable
    • isDisposed

      public final boolean isDisposed()
      Description copied from interface: Disposable
      Returns true if this resource has been disposed.
      Specified by:
      isDisposed in interface Disposable
      Returns:
      true if this resource has been disposed
    • clearValue

      void clearValue()
      Override this to clear values when the downstream disposes.
    • onSubscribeDownstream

      abstract void onSubscribeDownstream()
      Typically, this should be downstream.onSubscribe(this).
    • disposeInner

      abstract void disposeInner()
      Typically, this should be inner.dispose().
    • drain

      abstract void drain()
      Implement the serialized inner subscribing and value emission here.