public interface OperationResult
Modifier and Type | Interface and Description |
---|---|
static class |
OperationResult.Status |
Modifier and Type | Method and Description |
---|---|
OperationResult |
compose(java.util.function.Supplier<OperationResult> nextStep)
Creates new operation result that represents composition of two operation results.
|
static OperationResult |
fail() |
OperationResult.Status |
getStatus() |
OperationResult |
otherwise(java.lang.Runnable runnable)
Adds fail callback to the operation result.
|
static OperationResult |
success() |
OperationResult |
then(java.lang.Runnable runnable)
Adds success callback to the operation result.
|
static OperationResult fail()
static OperationResult success()
OperationResult.Status getStatus()
OperationResult compose(java.util.function.Supplier<OperationResult> nextStep)
nextStep
- the next operation result supplierOperationResult then(java.lang.Runnable runnable)
runnable
- callbackOperationResult otherwise(java.lang.Runnable runnable)
runnable
- callback