All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.tasks.GenericTask
java.lang.Object
|
+----com.sun.wizards.core.Task
|
+----com.sun.wizards.tasks.GenericTask
- public class GenericTask
- extends Task
- implements Serializable
The generic task is a sample task that does
nothing. The task is initialized with the
amount of time the task should take. The
task merely waits for the specified time.
This is a simple Task with one constructor that can only
be used one way, that is to wait the specified amount of
time and update its progress during the wait.
You can use this to test wizards before real Tasks are installed
using the following construction:
Sequence testSequence = new Sequence();
testSequence.addTask(new GenericTask(10));
-
GenericTask(int)
- Creates a GenericTask that waits the specified
length of time, in seconds.
-
addRuntimeResources(Vector)
- Add the runtime class requirements to the specified vector.
-
cancel()
- Cancel this task.
-
perform()
- Perform this task.
GenericTask
public GenericTask(int completionTime)
- Creates a GenericTask that waits the specified
length of time, in seconds.
- Parameters:
- completionTime - The number of seconds this task
takes to complete.
perform
public void perform()
- Perform this task. This method merely waits the amount
of time specified in the constructor.
- Overrides:
- perform in class Task
cancel
public void cancel()
- Cancel this task.
- Overrides:
- cancel in class Task
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Add the runtime class requirements to the specified vector.
- Parameters:
- resourceVector - The vector containing all runtime resources for this wizard.
- Overrides:
- addRuntimeResources in class Task
All Packages Class Hierarchy This Package Previous Next Index