Class BlockingOperatorToIterator.SubscriberIterator<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      T next()  
      void onCompleted()
      Notifies the Observer that the Observable has finished sending push-based notifications.
      void onError​(java.lang.Throwable e)
      Notifies the Observer that the Observable has experienced an error condition.
      void onNext​(Notification<? extends T> args)
      Provides the Observer with a new item to observe.
      void onStart()
      This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber.
      void remove()  
      private Notification<? extends T> take()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • LIMIT

        static final int LIMIT
      • notifications

        private final java.util.concurrent.BlockingQueue<Notification<? extends T>> notifications
      • received

        private int received
    • Constructor Detail

      • SubscriberIterator

        public SubscriberIterator()
    • Method Detail

      • onStart

        public void onStart()
        Description copied from class: Subscriber
        This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber. Override this method to add any useful initialization to your subscription, for instance to initiate backpressure.
        Overrides:
        onStart in class Subscriber<Notification<? extends T>>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>