Class BlockingObservableMostRecent.MostRecentObserver<T>
- java.lang.Object
-
- io.reactivex.rxjava3.observers.DefaultObserver<T>
-
- io.reactivex.rxjava3.internal.operators.observable.BlockingObservableMostRecent.MostRecentObserver<T>
-
- All Implemented Interfaces:
Observer<T>
- Enclosing class:
- BlockingObservableMostRecent<T>
static final class BlockingObservableMostRecent.MostRecentObserver<T> extends DefaultObserver<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
BlockingObservableMostRecent.MostRecentObserver.MostRecentIterator
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Object
value
-
Constructor Summary
Constructors Constructor Description MostRecentObserver(T value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockingObservableMostRecent.MostRecentObserver.MostRecentIterator
getIterable()
TheBlockingObservableMostRecent.MostRecentObserver.MostRecentIterator
return is not thread safe.void
onComplete()
Notifies theObserver
that theObservable
has finished sending push-based notifications.void
onError(java.lang.Throwable e)
Notifies theObserver
that theObservable
has experienced an error condition.void
onNext(T args)
Provides theObserver
with a new item to observe.-
Methods inherited from class io.reactivex.rxjava3.observers.DefaultObserver
cancel, onStart, onSubscribe
-
-
-
-
Constructor Detail
-
MostRecentObserver
MostRecentObserver(T value)
-
-
Method Detail
-
onComplete
public void onComplete()
Description copied from interface:Observer
Notifies theObserver
that theObservable
has finished sending push-based notifications.The
Observable
will not call this method if it callsObserver.onError(java.lang.Throwable)
.
-
onError
public void onError(java.lang.Throwable e)
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:
e
- the exception encountered by the Observable
-
onNext
public void onNext(T args)
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:
args
- the item emitted by the Observable
-
getIterable
public BlockingObservableMostRecent.MostRecentObserver.MostRecentIterator getIterable()
TheBlockingObservableMostRecent.MostRecentObserver.MostRecentIterator
return is not thread safe. In other words don't callBlockingObservableMostRecent.MostRecentObserver.MostRecentIterator.hasNext()
in one thread expectBlockingObservableMostRecent.MostRecentObserver.MostRecentIterator.next()
called from a different thread to work.- Returns:
- the Iterator
-
-