execute

open fun <T> FlowableUseCase<Unit, T>.execute(config: FlowableUseCaseConfig.Builder<T>.() -> Unit): Disposable

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.

Return

disposable of internal Flowable. This disposable is disposed automatically. It might be used to dispose use case when you need to dispose it in advance on your own.

Parameters

config

FlowablerConfig used to process results of internal Flowable.

open fun <ARGS, T> FlowableUseCase<ARGS, T>.execute(args: ARGS, config: FlowableUseCaseConfig.Builder<T>.() -> Unit): Disposable

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.

Return

disposable of internal Flowable. This disposable is disposed automatically. It might be used to dispose use case when you need to dispose it in advance on your own.

Parameters

args

Arguments used for initial use case initialisation.

config

FlowableUseCaseConfig used to process results of internal Flowable.