public abstract class AbstractScriptExecutor extends Object implements ScriptExecutor
ScriptExecutor.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScriptExecutor(ScriptEngine scriptEngine) |
protected |
AbstractScriptExecutor(String language) |
| Modifier and Type | Method and Description |
|---|---|
Object |
executeScript(ScriptSource scriptSource,
Map<String,Object> variables)
Execute a script from the provided
ScriptSource with an optional binding variables. |
ScriptEngine |
getScriptEngine() |
protected abstract Object |
postProcess(Object result,
ScriptEngine scriptEngine,
String script,
Bindings bindings)
Subclasses may implement this to provide any special handling required
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteScriptprotected final Log logger
protected AbstractScriptExecutor(String language)
protected AbstractScriptExecutor(ScriptEngine scriptEngine)
public ScriptEngine getScriptEngine()
@Nullable public Object executeScript(ScriptSource scriptSource, Map<String,Object> variables)
ScriptExecutorScriptSource with an optional binding variables.executeScript in interface ScriptExecutorscriptSource - The script source.variables - The variables.protected abstract Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings)
result - the result.scriptEngine - the engine.script - the script.bindings - the bindings.