@PublicAPI public class ScriptHandler extends Object implements Serializable
Constructor and Description |
---|
ScriptHandler()
ProActive Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addBinding(String name,
Object value)
Add a binding to the script that will be handle by this handler.
|
void |
addBindings(Map<String,Object> bindings)
Add multiple bindings to the script that will be handle by this handler.
|
Object |
getBinding(String name) |
<T> ScriptResult<T> |
handle(Script<T> script)
Execute a script using standard error and output as the output sink.
|
<T> ScriptResult<T> |
handle(Script<T> script,
PrintStream outputSink,
PrintStream errorSink)
Execute a script
|
public <T> ScriptResult<T> handle(Script<T> script, PrintStream outputSink, PrintStream errorSink)
script
- a script to executeoutputSink
- the output stream for the scripterrorSink
- the error stream for the scriptpublic <T> ScriptResult<T> handle(Script<T> script)
script
- a script to executepublic void addBinding(String name, Object value)
name
- the name of the variablevalue
- the value of the variable