Class BlockingLastObserver<T>
- java.lang.Object
-
- java.util.concurrent.CountDownLatch
-
- io.reactivex.rxjava3.internal.observers.BlockingBaseObserver<T>
-
- io.reactivex.rxjava3.internal.observers.BlockingLastObserver<T>
-
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Observer<T>,Disposable
public final class BlockingLastObserver<T> extends BlockingBaseObserver<T>
Blocks until the upstream signals its last value or completes.
-
-
Field Summary
-
Fields inherited from class io.reactivex.rxjava3.internal.observers.BlockingBaseObserver
cancelled, error, upstream, value
-
-
Constructor Summary
Constructors Constructor Description BlockingLastObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonError(java.lang.Throwable t)Notifies theObserverthat theObservablehas experienced an error condition.voidonNext(T t)Provides theObserverwith a new item to observe.-
Methods inherited from class io.reactivex.rxjava3.internal.observers.BlockingBaseObserver
blockingGet, dispose, isDisposed, onComplete, onSubscribe
-
-
-
-
Method Detail
-
onNext
public void onNext(T t)
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:
t- the item emitted by the Observable
-
onError
public void onError(java.lang.Throwable t)
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:
t- the exception encountered by the Observable
-
-