Class BlockingBaseObserver<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean cancelled  
      (package private) java.lang.Throwable error  
      (package private) Disposable upstream  
      (package private) T value  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T blockingGet()
      Block until the first value arrives and return it, otherwise return null for an empty source and rethrow any exception.
      void dispose()
      Dispose the resource, the operation should be idempotent.
      boolean isDisposed()
      Returns true if this resource has been disposed.
      void onComplete()
      Notifies the Observer that the Observable has finished sending push-based notifications.
      void onSubscribe​(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.util.concurrent.CountDownLatch

        await, await, countDown, getCount, toString
      • Methods inherited from class java.lang.Object

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

      • value

        T value
      • error

        java.lang.Throwable error
      • cancelled

        volatile boolean cancelled
    • Constructor Detail

      • BlockingBaseObserver

        public BlockingBaseObserver()
    • Method Detail

      • 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
      • blockingGet

        public final T blockingGet()
        Block until the first value arrives and return it, otherwise return null for an empty source and rethrow any exception.
        Returns:
        the first value or null if the source is empty