Class BlockingObservableNext.NextObserver<T>
- java.lang.Object
-
- io.reactivex.rxjava3.observers.DisposableObserver<Notification<T>>
-
- io.reactivex.rxjava3.internal.operators.observable.BlockingObservableNext.NextObserver<T>
-
- All Implemented Interfaces:
Observer<Notification<T>>,Disposable
- Enclosing class:
- BlockingObservableNext<T>
static final class BlockingObservableNext.NextObserver<T> extends DisposableObserver<Notification<T>>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.BlockingQueue<Notification<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 voidonComplete()Notifies theObserverthat theObservablehas finished sending push-based notifications.voidonError(java.lang.Throwable e)Notifies theObserverthat theObservablehas experienced an error condition.voidonNext(Notification<T> args)Provides theObserverwith a new item to observe.(package private) voidsetWaiting()Notification<T>takeNext()-
Methods inherited from class io.reactivex.rxjava3.observers.DisposableObserver
dispose, isDisposed, onStart, onSubscribe
-
-
-
-
Field Detail
-
buf
private final java.util.concurrent.BlockingQueue<Notification<T>> buf
-
waiting
final java.util.concurrent.atomic.AtomicInteger waiting
-
-
Method Detail
-
onComplete
public void onComplete()
Description copied from interface:ObserverNotifies theObserverthat 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 theObserverthat theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onComplete().- Parameters:
e- the exception encountered by the Observable
-
onNext
public void onNext(Notification<T> args)
Description copied from interface:ObserverProvides theObserverwith 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.onComplete()orObserver.onError(java.lang.Throwable).- Parameters:
args- the item emitted by the Observable
-
takeNext
public Notification<T> takeNext() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
setWaiting
void setWaiting()
-
-