R - The response value emitted by the Observable.Q - The request value.public abstract class ObservableUseCase<R,Q> extends UseCase<rx.Observable,Q>
UseCase.
The presenter simply subscribes to Observable returned by the execute(Object) method.
Observable| Constructor and Description |
|---|
ObservableUseCase(UseCaseExecutor useCaseExecutor,
PostExecutionThread postExecutionThread) |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<R> |
execute(Q param)
Executes use case.
|
protected abstract rx.Observable<R> |
interact(Q param)
A hook for interacting with the given parameter(request value) and returning a response value for
each concrete implementation.
|
getPostExecutionThread, getUseCaseExecutorpublic ObservableUseCase(UseCaseExecutor useCaseExecutor, PostExecutionThread postExecutionThread)
public rx.Observable<R> execute(@Nullable Q param)
UseCaseUseCase.interact(Object) to get response value.protected abstract rx.Observable<R> interact(@Nullable Q param)
UseCase
It should be called inside UseCase.execute(Object).