public abstract class AbstractScriptExecutor extends Object implements ScriptExecutor
ScriptExecutor| Modifier and Type | Field and Description |
|---|---|
protected String |
language |
protected Log |
logger |
protected ScriptEngine |
scriptEngine |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScriptExecutor(String language) |
| Modifier and Type | Method and Description |
|---|---|
Object |
executeScript(ScriptSource scriptSource,
Map<String,Object> variables) |
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 final ScriptEngine scriptEngine
protected final String language
protected AbstractScriptExecutor(String language)
public Object executeScript(ScriptSource scriptSource, Map<String,Object> 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.