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 void
onError(java.lang.Throwable t)
Notifies theObserver
that theObservable
has experienced an error condition.void
onNext(T t)
Provides theObserver
with 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:Observer
Provides theObserver
with a new item to observe.The
Observable
may call this method 0 or more times.The
Observable
will 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:Observer
Notifies theObserver
that theObservable
has experienced an error condition.If the
Observable
calls this method, it will not thereafter callObserver.onNext(T)
orObserver.onComplete()
.- Parameters:
t
- the exception encountered by the Observable
-
-