Class DisposableAutoReleaseMultiObserver<T>
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<Disposable>
-
- io.reactivex.rxjava3.internal.observers.AbstractDisposableAutoRelease
-
- io.reactivex.rxjava3.internal.observers.DisposableAutoReleaseMultiObserver<T>
-
- Type Parameters:
T
- the element type consumed
- All Implemented Interfaces:
CompletableObserver
,MaybeObserver<T>
,SingleObserver<T>
,Disposable
,LambdaConsumerIntrospection
,java.io.Serializable
public final class DisposableAutoReleaseMultiObserver<T> extends AbstractDisposableAutoRelease implements SingleObserver<T>, MaybeObserver<T>, CompletableObserver
Wraps lambda callbacks and when the upstream terminates or this (Single | Maybe | Completable) observer gets disposed, removes itself from aCompositeDisposable
.History: 0.18.0 @ RxJavaExtensions
- Since:
- 3.1.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Consumer<? super T>
onSuccess
private static long
serialVersionUID
-
Fields inherited from class io.reactivex.rxjava3.internal.observers.AbstractDisposableAutoRelease
composite, onComplete, onError
-
-
Constructor Summary
Constructors Constructor Description DisposableAutoReleaseMultiObserver(DisposableContainer composite, Consumer<? super T> onSuccess, Consumer<? super java.lang.Throwable> onError, Action onComplete)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onSuccess(T t)
Notifies theSingleObserver
with a single item and that theSingle
has finished sending push-based notifications.-
Methods inherited from class io.reactivex.rxjava3.internal.observers.AbstractDisposableAutoRelease
dispose, hasCustomOnError, isDisposed, onComplete, onError, onSubscribe, removeSelf
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.reactivex.rxjava3.core.CompletableObserver
onComplete, onError, onSubscribe
-
Methods inherited from interface io.reactivex.rxjava3.core.MaybeObserver
onComplete, onError, onSubscribe
-
Methods inherited from interface io.reactivex.rxjava3.core.SingleObserver
onError, onSubscribe
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DisposableAutoReleaseMultiObserver
public DisposableAutoReleaseMultiObserver(DisposableContainer composite, Consumer<? super T> onSuccess, Consumer<? super java.lang.Throwable> onError, Action onComplete)
-
-
Method Detail
-
onSuccess
public void onSuccess(T t)
Description copied from interface:SingleObserver
Notifies theSingleObserver
with a single item and that theSingle
has finished sending push-based notifications.The
Single
will not call this method if it callsSingleObserver.onError(java.lang.Throwable)
.- Specified by:
onSuccess
in interfaceMaybeObserver<T>
- Specified by:
onSuccess
in interfaceSingleObserver<T>
- Parameters:
t
- the item emitted by theSingle
-
-