Class BlockingBaseSubscriber<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean cancelled  
      (package private) java.lang.Throwable error  
      (package private) org.reactivestreams.Subscription 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 onComplete()  
      void onSubscribe​(org.reactivestreams.Subscription s)
      Implementors of this method should make sure everything that needs to be visible in Subscriber.onNext(Object) is established before calling Subscription.request(long).
      • 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
      • Methods inherited from interface org.reactivestreams.Subscriber

        onError, onNext
    • Field Detail

      • value

        T value
      • error

        java.lang.Throwable error
      • upstream

        org.reactivestreams.Subscription upstream
      • cancelled

        volatile boolean cancelled
    • Constructor Detail

      • BlockingBaseSubscriber

        public BlockingBaseSubscriber()
    • Method Detail

      • onSubscribe

        public final 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<T>
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<T>
      • onComplete

        public final void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<T>
      • 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