public class StandardScriptEvaluator extends Object implements ScriptEvaluator
| Constructor and Description |
|---|
StandardScriptEvaluator(StandardScriptEngineManager scriptEngineManager)
Constructs the script evaluator using the given JSR 223 script engine manager instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindVariableInGlobalScope(String name,
Object object)
Binds the given object to the given variable name in the global scope of all scripts evaluated via this
script evaluator.
|
<T> T |
evaluateScript(ScriptObject script,
Bindings bindings)
Evaluates scripts immediately using the configured JSR-223 script engine manager.
|
public StandardScriptEvaluator(StandardScriptEngineManager scriptEngineManager)
scriptEngineManager - the script engine manager to use for creating script engines. May not be null.public void bindVariableInGlobalScope(String name, Object object)
bindVariableInGlobalScope in interface ScriptEvaluatorname - the name of the variable to bind the object to.object - the object to bind into the global scope of all scripts.public <T> T evaluateScript(ScriptObject script, Bindings bindings) throws ScriptException
ThreadPoolScriptEvaluator if script interruption or
timeouts are required.evaluateScript in interface ScriptEvaluatorT - the type of result returned from the script.script - the script to evaluate.bindings - any additional variable bindings to set before running the script.ScriptException - if an error occurs in script execution.ScriptExceptionCopyright © 2010–2024 Open Identity Platform Community. All rights reserved.