execute

open fun CompletableUseCase<Unit>.execute(config: CompletableUseCaseConfig.Builder.() -> Unit): Disposable

Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of CompletableUseCase.execute method has already been called on this instance of CompletableUseCase, previous one is disposed, no matter what current state of internal Completable is. This behavior can be disabled by passing false to CompletableUseCaseConfig.disposePrevious method.

Return

disposable of internal Completable. 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

CompletablerConfig used to process results of internal Completable.

open fun <ARGS> CompletableUseCase<ARGS>.execute(args: ARGS, config: CompletableUseCaseConfig.Builder.() -> Unit): Disposable

Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of CompletableUseCase.execute method has already been called on this instance of CompletableUseCase, previous one is disposed, no matter what current state of internal Completable is. This behavior can be disabled by passing false to CompletableUseCaseConfig.disposePrevious method.

Return

disposable of internal Completable. 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

CompletableUseCaseConfig used to process results of internal Completable.