Modifier and Type | Method and Description |
---|---|
static <T> Disposable |
subscribeAutoDispose(Flowable<T> source,
CompositeDisposable composite,
Consumer<? super T> onNext)
Wraps the given onXXX callbacks into a
Disposable Subscriber ,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite. |
static <T> Disposable |
subscribeAutoDispose(Flowable<T> source,
CompositeDisposable composite,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError)
Wraps the given onXXX callbacks into a
Disposable Subscriber ,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite. |
static <T> Disposable |
subscribeAutoDispose(Flowable<T> source,
CompositeDisposable composite,
Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete)
Wraps the given onXXX callbacks into a
Disposable Subscriber ,
adds it to the given CompositeDisposable and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite. |
public static <T> Disposable subscribeAutoDispose(Flowable<T> source, CompositeDisposable composite, Consumer<? super T> onNext)
Disposable
Subscriber
,
adds it to the given CompositeDisposable
and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite.
The Subscriber will be removed after the callback for the terminal event has been invoked.
T
- the value typesource
- the source Flowable to subscribe to.composite
- the composite Disposable to add and remove the created Disposable SubscriberonNext
- the callback for upstream itemspublic static <T> Disposable subscribeAutoDispose(Flowable<T> source, CompositeDisposable composite, Consumer<? super T> onNext, Consumer<? super Throwable> onError)
Disposable
Subscriber
,
adds it to the given CompositeDisposable
and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite.
The Subscriber will be removed after the callback for the terminal event has been invoked.
T
- the value typesource
- the source Flowable to subscribe to.composite
- the composite Disposable to add and remove the created Disposable SubscriberonNext
- the callback for upstream itemsonError
- the callback for an upstream error if anypublic static <T> Disposable subscribeAutoDispose(Flowable<T> source, CompositeDisposable composite, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete)
Disposable
Subscriber
,
adds it to the given CompositeDisposable
and ensures, that if the upstream
completes or this particlular Disposable is disposed, the Subscriber is removed
from the given composite.
The Subscriber will be removed after the callback for the terminal event has been invoked.
T
- the value typesource
- the source Flowable to subscribe to.composite
- the composite Disposable to add and remove the created Disposable SubscriberonNext
- the callback for upstream itemsonError
- the callback for an upstream error if anyonComplete
- the callback for the upstream completion if any