|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.scripting.RhinoScriptRunner
public class RhinoScriptRunner
Script runner wrapper around a Rhino script engine.
| Nested Class Summary | |
|---|---|
static class |
RhinoScriptRunner.ErrorHandler
Error handler for this script runner. |
| Constructor Summary | |
|---|---|
RhinoScriptRunner()
Initialize the Rhino environment. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Perform cleanup after we're done using this script runner. |
Object |
evaluate(String script,
Map<String,Object> variables)
Evaluate the script specified as input and get the evaluation result. |
Object |
evaluate(String scriptId,
String script,
Map<String,Object> variables)
Evaluate the script specified as input and get the evaluation result. |
void |
init()
Initialize the execution environment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RhinoScriptRunner()
| Method Detail |
|---|
public Object evaluate(String script,
Map<String,Object> variables)
throws JPPFScriptingException
evaluate in interface ScriptRunnerscript - a string containing the script to evaluate.variables - a mapping of objects to add the scope of the script.
JPPFScriptingException - if an error occurs while evaluating the script.ScriptRunner.evaluate(java.lang.String script, java.util.Map)
public Object evaluate(String scriptId,
String script,
Map<String,Object> variables)
throws JPPFScriptingException
evaluate in interface ScriptRunnerscriptId - - a unique identifer for the script, to be used if the engine generates compiled code
which can be later retrieved through this id.script - - a string containing the script to evaluate.variables - - a mapping of objects to variable names, added within the scope of the script.
JPPFScriptingException - if an error occurs while evaluating the script.ScriptRunner.evaluate(java.lang.String, java.lang.String, java.util.Map)public void init()
init in interface ScriptRunnerScriptRunner.init()public void cleanup()
cleanup in interface ScriptRunnerScriptRunner.cleanup()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||