-
public interface MaybeDisposablesOwnerThis interface gives your class ability to execute MaybeUseCase 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(MaybeUseCase<Unit, T> $self, Function1<MaybeUseCaseConfig.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(MaybeUseCase<ARGS, T> $self, ARGS args, Function1<MaybeUseCaseConfig.Builder<T>, Unit> config)Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. <T extends Any> DisposableexecuteStream(Maybe<T> $self, Function1<MaybeUseCaseConfig.Builder<T>, Unit> config)Executes the Maybe and adds its disposable to shared, automatically disposed, composite disposable. abstract CompositeDisposablegetDisposables()-
-
Method Detail
-
execute
<T extends Any> Disposable execute(MaybeUseCase<Unit, T> $self, Function1<MaybeUseCaseConfig.Builder<T>, Unit> config)
Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of MaybeUseCase.execute method has already been called on this instance of MaybeUseCase, previous one is disposed, no matter what current state of internal Maybe is. This behavior can be disabled by passing false to MaybeUseCaseConfig.disposePrevious method.
- Parameters:
config- MayberConfig used to process results of internal Maybe.
-
execute
<ARGS extends Any, T extends Any> Disposable execute(MaybeUseCase<ARGS, T> $self, ARGS args, Function1<MaybeUseCaseConfig.Builder<T>, Unit> config)
Executes the use case and adds its disposable to shared, automatically disposed, composite disposable. In case some variant of MaybeUseCase.execute method has already been called on this instance of MaybeUseCase, previous one is disposed, no matter what current state of internal Maybe is. This behavior can be disabled by passing false to MaybeUseCaseConfig.disposePrevious method.
- Parameters:
args- Arguments used for initial use case initialisation.config- MaybeUseCaseConfig used to process results of internal Maybe.
-
executeStream
<T extends Any> Disposable executeStream(Maybe<T> $self, Function1<MaybeUseCaseConfig.Builder<T>, Unit> config)
Executes the Maybe and adds its disposable to shared, automatically disposed, composite disposable.
- Parameters:
config- MaybeUseCaseConfig used to process results of internal Maybe.
-
getDisposables
abstract CompositeDisposable getDisposables()
-
-
-
-