ScriptEngines. This class is thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private final ScriptEngine | |
| private static final Log |
| Access | Constructor and Description |
|---|---|
| public | ScriptEngineScriptEvaluator(ScriptEngine
the engine to be wrapped engine)Creates a new script executor. |
| Modifier and Type | Method and Description |
|---|---|
| private Object | |
| private boolean | Returns: true if the given engine is thread-safe, false otherwise.Checks whether the given engine is thread-safe or not. |
| public Object |
| engine | back to summary |
|---|---|
| private final ScriptEngine engine | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| ScriptEngineScriptEvaluator | back to summary |
|---|---|
| public ScriptEngineScriptEvaluator(ScriptEngine engine) Creates a new script executor.
| |
| doEvaluate | back to summary |
|---|---|
| private Object doEvaluate(String script, Map<String, Object> bindings) throws ScriptEvaluationException | |
| engineAllowsParallelAccessFromMultipleThreads | back to summary |
|---|---|
| private boolean engineAllowsParallelAccessFromMultipleThreads() Checks whether the given engine is thread-safe or not.
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(String script, Map<String, Object> bindings) throws ScriptEvaluationException Implements org. Executes the given script, using the given variable bindings. The execution of the script happens either synchronized or unsynchronized, depending on the engine's threading abilities. | |