Class AbstractScriptExecutor
java.lang.Object
org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
- All Implemented Interfaces:
ScriptExecutor
- Direct Known Subclasses:
DefaultScriptExecutor,PythonScriptExecutor
Base Class for
ScriptExecutor.- Since:
- 2.1
- Author:
- David Turanski, Mark Fisher, Artem Bilan, Gary Russell, Ngoc Nhan
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractScriptExecutor(String language) protectedAbstractScriptExecutor(ScriptEngine scriptEngine) -
Method Summary
Modifier and TypeMethodDescriptionexecuteScript(ScriptSource scriptSource, Map<String, Object> variables) Execute a script from the providedScriptSourcewith an optional bindingvariables.protected abstract ObjectpostProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) Subclasses may implement this to provide any special handling requiredMethods 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
-
Field Details
-
logger
-
-
Constructor Details
-
AbstractScriptExecutor
-
AbstractScriptExecutor
-
-
Method Details
-
getScriptEngine
-
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.
-
postProcess
protected abstract Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) Subclasses may implement this to provide any special handling required- Parameters:
result- the result.scriptEngine- the engine.script- the script.bindings- the bindings.- Returns:
- modified result
-