Class PythonScriptExecutor
java.lang.Object
org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
org.springframework.integration.scripting.jsr223.PythonScriptExecutor
- All Implemented Interfaces:
ScriptExecutor
@Deprecated(forRemoval=true,
since="6.4")
public class PythonScriptExecutor
extends AbstractScriptExecutor
Deprecated, for removal: This API element is subject to removal in a future version.
A
ScriptExecutor
that implements special handling required for Python to
emulate behavior similar to other JSR223 scripting languages.
Script evaluation using the Jython implementation results in a null
return
value for normal variable expressions such as x=2
. As a work around, it is
necessary to get the value of 'x' explicitly following the script evaluation. This
class performs simple parsing on the last line of the script to obtain the variable
name, if any, and return its value.
- Since:
- 2.1
- Author:
- David Turanski, Gary Russell, Artem Bilan
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Fields inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
logger
-
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
postProcess
(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses may implement this to provide any special handling requiredMethods inherited from class org.springframework.integration.scripting.jsr223.AbstractScriptExecutor
executeScript, getScriptEngine
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
-
PythonScriptExecutor
public PythonScriptExecutor()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
postProcess
protected Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractScriptExecutor
Subclasses may implement this to provide any special handling required- Specified by:
postProcess
in classAbstractScriptExecutor
- Parameters:
result
- the result.scriptEngine
- the engine.script
- the script.bindings
- the bindings.- Returns:
- modified result
-
PolyglotScriptExecutor
with apython
language argument.