Package rx.internal.operators
Class BlockingOperatorToIterator.SubscriberIterator<T>
java.lang.Object
rx.Subscriber<Notification<? extends T>>
rx.internal.operators.BlockingOperatorToIterator.SubscriberIterator<T>
- All Implemented Interfaces:
Iterator<T>,Observer<Notification<? extends T>>,Subscription
- Enclosing class:
BlockingOperatorToIterator
public static final class BlockingOperatorToIterator.SubscriberIterator<T>
extends Subscriber<Notification<? extends T>>
implements Iterator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Notification<? extends T> (package private) static final intprivate final BlockingQueue<Notification<? extends T>> private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()next()voidNotifies the Observer that theObservablehas finished sending push-based notifications.voidNotifies the Observer that theObservablehas experienced an error condition.voidonNext(Notification<? extends T> args) Provides the Observer with a new item to observe.voidonStart()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.voidremove()private Notification<? extends T> take()Methods inherited from class rx.Subscriber
add, isUnsubscribed, request, setProducer, unsubscribeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
LIMIT
static final int LIMIT -
notifications
-
buf
-
received
private int received
-
-
Constructor Details
-
SubscriberIterator
public SubscriberIterator()
-
-
Method Details
-
onStart
public void onStart()Description copied from class:SubscriberThis 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:
onStartin classSubscriber<Notification<? extends T>>
-
onCompleted
public void onCompleted()Description copied from interface:ObserverNotifies the Observer that theObservablehas finished sending push-based notifications.The
Observablewill not call this method if it callsObserver.onError(java.lang.Throwable).- Specified by:
onCompletedin interfaceObserver<T>
-
onError
Description copied from interface:ObserverNotifies the Observer that theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onCompleted(). -
onNext
Description copied from interface:ObserverProvides the Observer with a new item to observe.The
Observablemay call this method 0 or more times.The
Observablewill not call this method again after it calls eitherObserver.onCompleted()orObserver.onError(java.lang.Throwable). -
hasNext
public boolean hasNext() -
next
-
take
-
remove
public void remove()
-