Class SingleFlatMapNotification.FlatMapSingleObserver<T,R>
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<Disposable>
-
- io.reactivex.rxjava3.internal.operators.single.SingleFlatMapNotification.FlatMapSingleObserver<T,R>
-
- All Implemented Interfaces:
SingleObserver<T>,Disposable,java.io.Serializable
- Enclosing class:
- SingleFlatMapNotification<T,R>
static final class SingleFlatMapNotification.FlatMapSingleObserver<T,R> extends java.util.concurrent.atomic.AtomicReference<Disposable> implements SingleObserver<T>, Disposable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classSingleFlatMapNotification.FlatMapSingleObserver.InnerObserver
-
Field Summary
Fields Modifier and Type Field Description (package private) SingleObserver<? super R>downstream(package private) Function<? super java.lang.Throwable,? extends SingleSource<? extends R>>onErrorMapper(package private) Function<? super T,? extends SingleSource<? extends R>>onSuccessMapperprivate static longserialVersionUID(package private) Disposableupstream
-
Constructor Summary
Constructors Constructor Description FlatMapSingleObserver(SingleObserver<? super R> actual, Function<? super T,? extends SingleSource<? extends R>> onSuccessMapper, Function<? super java.lang.Throwable,? extends SingleSource<? extends R>> onErrorMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose the resource, the operation should be idempotent.booleanisDisposed()Returns true if this resource has been disposed.voidonError(java.lang.Throwable e)Notifies theSingleObserverthat theSinglehas experienced an error condition.voidonSubscribe(Disposable d)Provides theSingleObserverwith the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)itself) and asynchronous manner.voidonSuccess(T value)Notifies theSingleObserverwith a single item and that theSinglehas finished sending push-based notifications.-
Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
downstream
final SingleObserver<? super R> downstream
-
onSuccessMapper
final Function<? super T,? extends SingleSource<? extends R>> onSuccessMapper
-
onErrorMapper
final Function<? super java.lang.Throwable,? extends SingleSource<? extends R>> onErrorMapper
-
upstream
Disposable upstream
-
-
Constructor Detail
-
FlatMapSingleObserver
FlatMapSingleObserver(SingleObserver<? super R> actual, Function<? super T,? extends SingleSource<? extends R>> onSuccessMapper, Function<? super java.lang.Throwable,? extends SingleSource<? extends R>> onErrorMapper)
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
isDisposed
public boolean isDisposed()
Description copied from interface:DisposableReturns true if this resource has been disposed.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if this resource has been disposed
-
onSubscribe
public void onSubscribe(Disposable d)
Description copied from interface:SingleObserverProvides theSingleObserverwith the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from withinonSubscribe(Disposable)itself) and asynchronous manner.- Specified by:
onSubscribein interfaceSingleObserver<T>- Parameters:
d- the Disposable instance whoseDisposable.dispose()can be called anytime to cancel the connection
-
onSuccess
public void onSuccess(T value)
Description copied from interface:SingleObserverNotifies theSingleObserverwith a single item and that theSinglehas finished sending push-based notifications.The
Singlewill not call this method if it callsSingleObserver.onError(java.lang.Throwable).- Specified by:
onSuccessin interfaceSingleObserver<T>- Parameters:
value- the item emitted by theSingle
-
onError
public void onError(java.lang.Throwable e)
Description copied from interface:SingleObserverNotifies theSingleObserverthat theSinglehas experienced an error condition.If the
Singlecalls this method, it will not thereafter callSingleObserver.onSuccess(T).- Specified by:
onErrorin interfaceSingleObserver<T>- Parameters:
e- the exception encountered by theSingle
-
-