Class PolyglotScriptExecutor
java.lang.Object
org.springframework.integration.scripting.PolyglotScriptExecutor
- All Implemented Interfaces:
ScriptExecutor
GraalVM Polyglot
ScriptExecutor
implementation.- Since:
- 6.0
- Author:
- Artem Bilan
-
Constructor Summary
ConstructorDescriptionPolyglotScriptExecutor
(String language) Construct an executor based on the provided language id.PolyglotScriptExecutor
(String language, org.graalvm.polyglot.Context.Builder contextBuilder) Construct an executor based on the provided language id. -
Method Summary
Modifier and TypeMethodDescriptionexecuteScript
(ScriptSource scriptSource, Map<String, Object> variables) Execute a script from the providedScriptSource
with an optional bindingvariables
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.scripting.ScriptExecutor
executeScript
-
Constructor Details
-
PolyglotScriptExecutor
Construct an executor based on the provided language id.- Parameters:
language
- the supported by GraalVM language id.
-
PolyglotScriptExecutor
Construct an executor based on the provided language id.- Parameters:
language
- the supported by GraalVM language id.
-
-
Method Details
-
executeScript
Description copied from interface:ScriptExecutor
Execute a script from the providedScriptSource
with an optional bindingvariables
.- Specified by:
executeScript
in interfaceScriptExecutor
- Parameters:
scriptSource
- The script source.variables
- The variables.- Returns:
- The result of the execution.
-