@NotThreadSafe public class UnknownOperationResult extends java.lang.Object implements OperationResult
OperationResult.Status
Constructor and Description |
---|
UnknownOperationResult() |
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.
|
void |
fail() |
OperationResult.Status |
getStatus() |
OperationResult |
otherwise(java.lang.Runnable runnable)
Adds fail callback to the operation result.
|
void |
resolveWith(OperationResult result)
Resolve this result depending on the passed result.
|
void |
resume(OperationResult result)
Resume action depending on the passed result.
|
void |
success() |
OperationResult |
then(java.lang.Runnable runnable)
Adds success callback to the operation result.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fail, success
public OperationResult.Status getStatus()
getStatus
in interface OperationResult
public OperationResult compose(java.util.function.Supplier<OperationResult> nextStep)
OperationResult
compose
in interface OperationResult
nextStep
- the next operation result supplierpublic OperationResult then(java.lang.Runnable runnable)
OperationResult
then
in interface OperationResult
runnable
- callbackpublic OperationResult otherwise(java.lang.Runnable runnable)
OperationResult
otherwise
in interface OperationResult
runnable
- callbackpublic void fail()
public void success()
public void resolveWith(OperationResult result)
resume(OperationResult)
.result
- dependencypublic void resume(OperationResult result)
result
- dependencypublic java.lang.String toString()
toString
in class java.lang.Object