public static class UseCaseConfig.Builder<T>
Constructs references to lambdas and some basic configuration used to process results of Coroutine use case.
| Constructor and Description |
|---|
Builder()
Constructs references to lambdas and some basic configuration
used to process results of Coroutine use case.
|
| Modifier and Type | Method and Description |
|---|---|
CoroutineScopeOwner.UseCaseConfig<T> |
build() |
void |
disposePrevious(boolean disposePrevious)
Set whether currently active Job of internal Coroutine
should be canceled when execute is called repeatedly.
Default value is true.
|
void |
onError(kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> onError)
Set lambda that is called when exception on
internal Coroutine occurs
|
void |
onStart(kotlin.jvm.functions.Function0<kotlin.Unit> onStart)
Set lambda that is called right before
the internal Coroutine is created
|
void |
onSuccess(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> onSuccess)
Set lambda that is called when internal Coroutine
finished without exceptions
|
public Builder()
Constructs references to lambdas and some basic configuration used to process results of Coroutine use case.
public void onStart(@NotNull
kotlin.jvm.functions.Function0<kotlin.Unit> onStart)
Set lambda that is called right before the internal Coroutine is created
onStart - Lambda called right before Coroutine iscreatedpublic void onSuccess(@NotNull
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> onSuccess)
Set lambda that is called when internal Coroutine finished without exceptions
onSuccess - Lambda called when Coroutine finishedpublic void onError(@NotNull
kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> onError)
Set lambda that is called when exception on internal Coroutine occurs
onError - Lambda called when exception occurspublic void disposePrevious(boolean disposePrevious)
Set whether currently active Job of internal Coroutine should be canceled when execute is called repeatedly. Default value is true.
disposePrevious - True if active Job of internalCoroutine should be canceled. Default value is true.@NotNull public CoroutineScopeOwner.UseCaseConfig<T> build()