public interface JsEvaluateContext
EvaluateToMappingExtension
Modifier and Type | Interface and Description |
---|---|
static interface |
JsEvaluateContext.EvaluateCallback
A callback for the "evaluate" request.
|
static interface |
JsEvaluateContext.PrimitiveValueFactory
Locally creates primitive values.
|
static interface |
JsEvaluateContext.ResultOrException |
Modifier and Type | Method and Description |
---|---|
RelayOk |
evaluateAsync(java.lang.String expression,
java.util.Map<java.lang.String,? extends JsValue> additionalContext,
JsEvaluateContext.EvaluateCallback evaluateCallback,
SyncCallback syncCallback)
Asynchronously evaluates an arbitrary JavaScript
expression in
the particular context. |
void |
evaluateSync(java.lang.String expression,
java.util.Map<java.lang.String,? extends JsValue> additionalContext,
JsEvaluateContext.EvaluateCallback evaluateCallback)
Synchronously evaluates an arbitrary JavaScript
expression in
the particular context. |
JsEvaluateContext.PrimitiveValueFactory |
getValueFactory() |
void evaluateSync(java.lang.String expression, java.util.Map<java.lang.String,? extends JsValue> additionalContext, JsEvaluateContext.EvaluateCallback evaluateCallback) throws MethodIsBlockingException
expression
in
the particular context.
Previously loaded JsObject
s can be addressed from the expression if listed in
additionalContext parameter.
The evaluation result is reported to the specified evaluateCallback
.
The method will block until the evaluation result is available.expression
- to evaluateadditionalContext
- a name-to-value map that adds new values to an expression
scope; may be nullevaluateCallback
- to report the evaluation result toMethodIsBlockingException
- if called from a callback because it blocks
until remote VM returns resultRelayOk evaluateAsync(java.lang.String expression, java.util.Map<java.lang.String,? extends JsValue> additionalContext, JsEvaluateContext.EvaluateCallback evaluateCallback, SyncCallback syncCallback)
expression
in
the particular context.
Previously loaded JsObject
s can be addressed from the expression if listed in
additionalContext parameter.
The evaluation result is reported to the specified evaluateCallback
.
The method doesn't block.expression
- to evaluateadditionalContext
- a name-to-value map that adds new values to an expression
scope; may be nullevaluateCallback
- to report the evaluation result tosyncCallback
- to report the end of any processingJsEvaluateContext.PrimitiveValueFactory getValueFactory()
JsValue
instances for primitive values.Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.