|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.exoftware.exactor.ExecutionSet
A collection of scripts to be executed together. ExecutionSetListeners can be added to the ExecutionSet to be notified of script and command events. The ExecutionSet contains a global context for all scripts it contains.
Field Summary | |
static java.lang.String |
SCRIPT_EXTENSION
|
Constructor Summary | |
ExecutionSet()
|
Method Summary | |
void |
addCommandMapping(java.lang.String name,
java.lang.Class c)
Add a mapping of a command class to the specified name . |
void |
addCompositeMapping(java.lang.String name,
java.io.File scriptFile)
Add a mapping of a composite scriptFile to the specified name . |
void |
addListener(ExecutionSetListener listener)
Add a listener to the ExecutionSet. |
void |
addScript(Script s)
Add a script to the ExecutionSet. |
void |
execute()
Execute all the scripts in the ExecutionSet. |
Command |
findCommand(java.lang.String name)
Find a Command with the specified name. |
void |
fireCommandEnded(Command c,
java.lang.Throwable t)
Notify all added listeners that the specified command has ended, possibly in error. |
void |
fireCommandStarted(Command c)
Notify all added listeners that the specified command has started. |
void |
fireExecutionSetEnded()
Notify all added listeners that the execution set has ended. |
void |
fireExecutionSetStarted()
Notify all added listeners that the execution set has started. |
void |
fireScriptEnded(Script s)
Notify all added listeners that the specified script has ended. |
void |
fireScriptStarted(Script s)
Notify all added listeners that the specified script has started. |
java.util.Map |
getContext()
Returns the context for all scripts in this ExecutionSet. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SCRIPT_EXTENSION
Constructor Detail |
public ExecutionSet()
Method Detail |
public java.util.Map getContext()
System.getProperties()
.
System.getProperties()
public void addScript(Script s)
s
- the script to add.public void addListener(ExecutionSetListener listener)
listener
- the listener to add.public void execute()
public void fireExecutionSetStarted()
public void fireExecutionSetEnded()
public void fireScriptStarted(Script s)
s
- the started script.public void fireScriptEnded(Script s)
s
- the ended script.public void fireCommandStarted(Command c)
c
- the started command.public void fireCommandEnded(Command c, java.lang.Throwable t)
c
- the ended commandt
- the reason the commanded ended or null
.public Command findCommand(java.lang.String name)
Command
with the specified name.
name
- the name of the Command
to find.
Command
for the specified name, or null
if no command
could be found.public void addCommandMapping(java.lang.String name, java.lang.Class c) throws java.lang.RuntimeException
name
.
name
- the name to use to reference this command in a scriptc
- the command class to execute for the supplied name.
java.lang.RuntimeException
- if name
or c
are null
, or
if c
is not a Command
class.public void addCompositeMapping(java.lang.String name, java.io.File scriptFile)
name
.
name
- the name to use to reference this command in a scriptFilescriptFile
- the scriptFile to execute for the suppied name.
java.lang.RuntimeException
- if name
or scriptFile
are null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |