Package rx.internal.operators
Class BlockingOperatorNext.NextObserver<T>
- java.lang.Object
-
- rx.Subscriber<Notification<? extends T>>
-
- rx.internal.operators.BlockingOperatorNext.NextObserver<T>
-
- All Implemented Interfaces:
Observer<Notification<? extends T>>,Subscription
- Enclosing class:
- BlockingOperatorNext
static final class BlockingOperatorNext.NextObserver<T> extends Subscriber<Notification<? extends T>>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.BlockingQueue<Notification<? extends T>>buf(package private) java.util.concurrent.atomic.AtomicIntegerwaiting
-
Constructor Summary
Constructors Constructor Description NextObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCompleted()Notifies the Observer that theObservablehas finished sending push-based notifications.voidonError(java.lang.Throwable e)Notifies the Observer that theObservablehas experienced an error condition.voidonNext(Notification<? extends T> args)Provides the Observer with a new item to observe.(package private) voidsetWaiting(int value)Notification<? extends T>takeNext()-
Methods inherited from class rx.Subscriber
add, isUnsubscribed, onStart, request, setProducer, unsubscribe
-
-
-
-
Field Detail
-
buf
private final java.util.concurrent.BlockingQueue<Notification<? extends T>> buf
-
waiting
final java.util.concurrent.atomic.AtomicInteger waiting
-
-
Method Detail
-
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).
-
onError
public void onError(java.lang.Throwable e)
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().- Parameters:
e- the exception encountered by the Observable
-
onNext
public void onNext(Notification<? extends T> args)
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).- Parameters:
args- the item emitted by the Observable
-
takeNext
public Notification<? extends T> takeNext() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
setWaiting
void setWaiting(int value)
-
-