-
public interface FlowableDisposablesOwnerThis interface gives your class ability to execute FlowableUseCase use cases and automatically add resulting disposables to one composite disposable. You may find handy to implement this interface in custom Presenters, ViewHolders etc.
Consider using DisposablesOwner to support all of the basic RxJava 2 types.
It is your responsibility to clear this composite disposable when all running tasks should be stopped.
-
-
Method Summary
Modifier and Type Method Description <T extends Any> Disposableexecute(FlowableUseCase<Unit, T> $self, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. <ARGS extends Any, T extends Any> Disposableexecute(FlowableUseCase<ARGS, T> $self, ARGS args, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. <T extends Any> DisposableexecuteStream(Flowable<T> $self, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)Executes the Flowable and adds its disposable to shared, automatically disposed, composite disposable. abstract CompositeDisposablegetDisposables()-
-
Method Detail
-
execute
<T extends Any> Disposable execute(FlowableUseCase<Unit, T> $self, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)
Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of FlowableUseCase.execute method has already been called on this instance of FlowableUseCase, previous one is disposed, no matter what current state of internal Flowable is. This behavior can be disabled by passing false to FlowableUseCaseConfig.disposePrevious method.
- Parameters:
config- FlowablerConfig used to process results of internal Flowable.
-
execute
<ARGS extends Any, T extends Any> Disposable execute(FlowableUseCase<ARGS, T> $self, ARGS args, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)
Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of FlowableUseCase.execute method has already been called on this instance of FlowableUseCase, previous one is disposed, no matter what current state of internal Flowable is. This behavior can be disabled by passing false to FlowableUseCaseConfig.disposePrevious method.
- Parameters:
args- Arguments used for initial use case initialisation.config- FlowableUseCaseConfig used to process results of internal Flowable.
-
executeStream
<T extends Any> Disposable executeStream(Flowable<T> $self, Function1<FlowableUseCaseConfig.Builder<T>, Unit> config)
Executes the Flowable and adds its disposable to shared, automatically disposed, composite disposable.
- Parameters:
config- FlowableUseCaseConfig used to process results of internal Flowable.
-
getDisposables
abstract CompositeDisposable getDisposables()
-
-
-
-