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
ConstructorsConstructorDescriptionPolyglotScriptExecutor(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 providedScriptSourcewith an optional bindingvariables.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ScriptExecutorExecute a script from the providedScriptSourcewith an optional bindingvariables.- Specified by:
executeScriptin interfaceScriptExecutor- Parameters:
scriptSource- The script source.variables- The variables.- Returns:
- The result of the execution.
-