Class DisposableObserver<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.atomic.AtomicReference<Disposable> upstream  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Dispose the resource, the operation should be idempotent.
      boolean isDisposed()
      Returns true if this resource has been disposed.
      protected void onStart()
      Called once the single upstream Disposable is set via onSubscribe.
      void onSubscribe​(@NonNull Disposable d)
      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.
      • Methods inherited from class java.lang.Object

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

      • upstream

        final java.util.concurrent.atomic.AtomicReference<Disposable> upstream
    • Constructor Detail

      • DisposableObserver

        public DisposableObserver()
    • Method Detail

      • onStart

        protected void onStart()
        Called once the single upstream Disposable is set via onSubscribe.
      • 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
      • dispose

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