public final class CompletableConsumers
extends java.lang.Object
Completables.| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.disposables.Disposable |
subscribeAutoDispose(io.reactivex.Completable source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Action onComplete)
Wraps the given onXXX callbacks into a
Disposable CompletableObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the CompletableObserver is removed
from the given composite. |
static io.reactivex.disposables.Disposable |
subscribeAutoDispose(io.reactivex.Completable source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Action onComplete,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Wraps the given onXXX callbacks into a
Disposable CompletableObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the CompletableObserver is removed
from the given composite. |
public static io.reactivex.disposables.Disposable subscribeAutoDispose(io.reactivex.Completable source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Action onComplete)
Disposable CompletableObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the CompletableObserver is removed
from the given composite.
The CompletableObserver will be removed after the callback for the terminal event has been invoked.
source - the source Completable to subscribe to.composite - the composite Disposable to add and remove the created Disposable CompletableObserveronComplete - the callback for when the upstream completespublic static io.reactivex.disposables.Disposable subscribeAutoDispose(io.reactivex.Completable source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Action onComplete,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Disposable CompletableObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the CompletableObserver is removed
from the given composite.
The CompletableObserver will be removed after the callback for the terminal event has been invoked.
source - the source Completable to subscribe to.composite - the composite Disposable to add and remove the created Disposable CompletableObserveronComplete - the callback for when the upstream completesonError - the callback for an upstream error if any