|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.chaosserver.bilbo.task.BaseTask | +--net.chaosserver.bilbo.task.CompositeTask
This is a task made up of other tasks.
It will execute each subtask in order.
Nested Class Summary | |
protected class |
CompositeTask.SubTask
Subtask objects held inside the taskList. |
Field Summary | |
protected List |
taskList
List of tasks to be executed. |
Fields inherited from class net.chaosserver.bilbo.task.BaseTask |
settings |
Constructor Summary | |
protected |
CompositeTask()
Default contructor. |
Method Summary | |
protected void |
addTask(String taskName)
Adds a task without arguments. |
protected void |
addTask(String taskName,
String taskArguments)
Adds a task into the task list. |
void |
executeSpecific()
Executes each task in the task list. |
void |
parseTaskArguments(String argumentString)
Does nothing. |
protected abstract void |
setUp()
Called at the start of executeSpecific to add subtasks. |
Methods inherited from class net.chaosserver.bilbo.task.BaseTask |
execute, getHelpResource, getSettings, printHelp, setSettings |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected List taskList
Constructor Detail |
protected CompositeTask()
Method Detail |
public void parseTaskArguments(String argumentString)
parseTaskArguments
in interface Task
parseTaskArguments
in class BaseTask
argumentString
- string of arguments for this taskpublic void executeSpecific() throws TaskException
executeSpecific
in class BaseTask
TaskException
- if the sub tasks encounter and errorprotected abstract void setUp() throws TaskException
Concrete subclasses must over-ride this and should use it
to make calls to addTask
to add tasks into
the parent.
TaskException
- if a child class wants to breakprotected void addTask(String taskName, String taskArguments)
taskName
- the name of the task to addtaskArguments
- the argument string to give the taskprotected void addTask(String taskName)
taskName
- the name of the task to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |