public class CompletableUseCase<ARGS> extends BaseUseCase
Base use case which wraps Completable. Instance of this
use case can be simply executed in cooperation with
interface CompletableDisposablesOwner interface.
Wrapped stream is subscribed on io.reactivex.schedulers.Schedulers.io and
observed on io.reactivex.android.schedulers.AndroidSchedulers.mainThread
by default. You may override these through workScheduler and
resultScheduler respectively.
| Constructor and Description |
|---|
CompletableUseCase()
Base use case which wraps Completable. Instance of this
use case can be simply executed in cooperation with
interface CompletableDisposablesOwner interface. |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Completable |
create(ARGS args)
Creates internal Completable Rx stream, applies requested work
& result schedulers and exposes this stream as a Completable. This method
is handy when you want to combine streams of multiple use cases.
For example:
|
protected io.reactivex.Completable |
prepare(ARGS args)
Prepares whole wrapped Completable Rx stream. This method does not
subscribe to the stream.
|
getResultScheduler, getWorkSchedulerpublic CompletableUseCase()
Base use case which wraps Completable. Instance of this
use case can be simply executed in cooperation with
interface CompletableDisposablesOwner interface.
Wrapped stream is subscribed on io.reactivex.schedulers.Schedulers.io and
observed on io.reactivex.android.schedulers.AndroidSchedulers.mainThread
by default. You may override these through workScheduler and
resultScheduler respectively.
@NotNull protected io.reactivex.Completable prepare(ARGS args)
Prepares whole wrapped Completable Rx stream. This method does not subscribe to the stream.
@NotNull public io.reactivex.Completable create(ARGS args)
Creates internal Completable Rx stream, applies requested work & result schedulers and exposes this stream as a Completable. This method is handy when you want to combine streams of multiple use cases. For example:
usecase_A.create(Unit).andThen(usecase_B.stream(Unit))