Class SubscriberHelpers.ObservableSubscriber<T>

java.lang.Object
org.nustaq.kontraktor.services.rlserver.mongodb.SubscriberHelpers.ObservableSubscriber<T>
Type Parameters:
T - The publishers result type
All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
Direct Known Subclasses:
SubscriberHelpers.OperationSubscriber
Enclosing class:
SubscriberHelpers

public static class SubscriberHelpers.ObservableSubscriber<T>
extends java.lang.Object
implements org.reactivestreams.Subscriber<T>
A Subscriber that stores the publishers results and provides a latch so can block on completion.
  • Method Details

    • onSubscribe

      public void onSubscribe​(org.reactivestreams.Subscription s)
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<T>
    • onNext

      public void onNext​(T t)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<T>
    • onError

      public void onError​(java.lang.Throwable t)
      Specified by:
      onError in interface org.reactivestreams.Subscriber<T>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<T>
    • getSubscription

      public org.reactivestreams.Subscription getSubscription()
    • getReceived

      public java.util.List<T> getReceived()
    • getError

      public java.lang.Throwable getError()
    • isCompleted

      public boolean isCompleted()
    • get

      public java.util.List<T> get​(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Throwable
      Throws:
      java.lang.Throwable
    • await

      public SubscriberHelpers.ObservableSubscriber<T> await() throws java.lang.Throwable
      Throws:
      java.lang.Throwable
    • await

      public SubscriberHelpers.ObservableSubscriber<T> await​(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Throwable
      Throws:
      java.lang.Throwable