public final class MaybeConsumers
extends java.lang.Object
Maybes.| Modifier and Type | Method and Description |
|---|---|
static <T> io.reactivex.disposables.Disposable |
subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess)
Wraps the given onXXX callbacks into a
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite. |
static <T> io.reactivex.disposables.Disposable |
subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Wraps the given onXXX callbacks into a
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite. |
static <T> io.reactivex.disposables.Disposable |
subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError,
io.reactivex.functions.Action onComplete)
Wraps the given onXXX callbacks into a
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite. |
public static <T> io.reactivex.disposables.Disposable subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess)
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite.
The MaybeObserver will be removed after the callback for the terminal event has been invoked.
T - the value typesource - the source Maybe to subscribe to.composite - the composite Disposable to add and remove the created Disposable MaybeObserveronSuccess - the callback for upstream itemspublic static <T> io.reactivex.disposables.Disposable subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError)
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite.
The MaybeObserver will be removed after the callback for the terminal event has been invoked.
T - the value typesource - the source Maybe to subscribe to.composite - the composite Disposable to add and remove the created Disposable MaybeObserveronSuccess - the callback for upstream itemsonError - the callback for an upstream error if anypublic static <T> io.reactivex.disposables.Disposable subscribeAutoDispose(io.reactivex.Maybe<T> source,
io.reactivex.disposables.CompositeDisposable composite,
io.reactivex.functions.Consumer<? super T> onSuccess,
io.reactivex.functions.Consumer<? super java.lang.Throwable> onError,
io.reactivex.functions.Action onComplete)
Disposable MaybeObserver,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the MaybeObserver is removed
from the given composite.
The MaybeObserver will be removed after the callback for the terminal event has been invoked.
T - the value typesource - the source Maybe to subscribe to.composite - the composite Disposable to add and remove the created Disposable MaybeObserveronSuccess - the callback for upstream itemsonError - the callback for an upstream error if anyonComplete - the callback for the upstream completion if any