Class SingleDoAfterTerminate.DoAfterTerminateObserver<T>

java.lang.Object
io.reactivex.rxjava3.internal.operators.single.SingleDoAfterTerminate.DoAfterTerminateObserver<T>
All Implemented Interfaces:
SingleObserver<T>, Disposable
Enclosing class:
SingleDoAfterTerminate<T>

static final class SingleDoAfterTerminate.DoAfterTerminateObserver<T> extends Object implements SingleObserver<T>, Disposable
  • Field Details

  • Constructor Details

    • DoAfterTerminateObserver

      DoAfterTerminateObserver(SingleObserver<? super T> actual, Action onAfterTerminate)
  • 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<T>
      Parameters:
      d - the Disposable instance whose Disposable.dispose() can be called anytime to cancel the connection
    • onSuccess

      public void onSuccess(T t)
      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<T>
      Parameters:
      t - the item emitted by the Single
    • 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<T>
      Parameters:
      e - the exception encountered by the Single
    • dispose

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

      public 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
    • onAfterTerminate

      private void onAfterTerminate()