Modifier and Type | Method and Description |
---|---|
static <T> Disposable |
subscribeAutoDispose(Maybe<T> source,
CompositeDisposable composite,
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> Disposable |
subscribeAutoDispose(Maybe<T> source,
CompositeDisposable composite,
Consumer<? super T> onSuccess,
Consumer<? super 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> Disposable |
subscribeAutoDispose(Maybe<T> source,
CompositeDisposable composite,
Consumer<? super T> onSuccess,
Consumer<? super Throwable> onError,
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> Disposable subscribeAutoDispose(Maybe<T> source, CompositeDisposable composite, 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> Disposable subscribeAutoDispose(Maybe<T> source, CompositeDisposable composite, Consumer<? super T> onSuccess, Consumer<? super 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> Disposable subscribeAutoDispose(Maybe<T> source, CompositeDisposable composite, Consumer<? super T> onSuccess, Consumer<? super Throwable> onError, 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