T
- The type of the promised valuepublic static interface EvalContext.Promise<T>
EvalContext.Value
that is supposed to be set(Object)
.
This is supposed to be used where the processing for producing a value happens in a different environment but is needed by values produced in this context.
Modifier and Type | Method and Description |
---|---|
void |
fail(Throwable throwable)
Fail the promise.
|
void |
set(T value)
Fulfill the promise.
|
EvalContext.Value<T> |
value()
The value for this promise.
|
EvalContext.Value<T> value()
void set(T value)
value
- The value to fulfill the promise withIllegalStateException
- if the promise was already fulfilledvoid fail(Throwable throwable)
throwable
- The exception that is the cause of the failureCopyright © 2020. All rights reserved.