All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.core.Task
java.lang.Object
|
+----com.sun.wizards.core.Task
- public class Task
- extends Object
- implements Serializable
Task is a step in a Sequence. A Task object is used to perform
some operation within the wizard's server. Tasks are always executed
on the server side.
-
parent
- The parent Task of this object.
Deprecated.
-
progress
- Local cache of last progress bar percentage update
Deprecated.
-
sequence
- The sequence of tasks that manages this task.
Deprecated.
-
threadInClient
- A flag that indicates if the task is currently making a
client call.
Deprecated.
-
wizardState
- The WizardState object that owns the sequence.
Deprecated.
-
Task()
- Creates a task.
-
addRuntimeResources(Vector)
- Add the runtime class requirements to the specified vector.
-
cancel()
- Cancel this task.
-
cleanup()
- This method is called after the sequence has completed, and gives the
task an opportunity to finish.
-
estimatedCompletionTime(boolean)
- An estimation of how long it will take to complete
this task, in milliseconds.
-
getParentTask()
- Returns the parent of this Task.
-
getProgress()
- get current progress of task
-
getSequence()
- Returns the Sequence that contains this Task.
-
getWizardState()
- Returns the wizardState that owns this Task.
-
ignore(boolean)
- Returns false if this task does not want to be
ignored, or true if this task should be ignored.
-
initialize(Sequence)
- Initialize this task.
-
isCallingClient()
- Returns true if this task is currently making a call into the client.
-
isCancelled()
- return task cancellation status
-
perform()
- Perform this Task.
-
requiresCleanup()
- If the task requires cleanup when the sequence has completed,
this method should return true.
-
reverse()
- Reverse this Task.
-
setParentTask(Task)
- Set the parent Task of this object.
-
setProgress(int)
- Set the progress of this task.
parent
protected Task parent
- Note: parent is deprecated.
- The parent Task of this object.
sequence
protected transient Sequence sequence
- Note: sequence is deprecated.
- The sequence of tasks that manages this task.
wizardState
protected transient WizardState wizardState
- Note: wizardState is deprecated.
- The WizardState object that owns the sequence.
threadInClient
protected transient Boolean threadInClient
- Note: threadInClient is deprecated.
- A flag that indicates if the task is currently making a
client call.
progress
protected transient int progress
- Note: progress is deprecated.
- Local cache of last progress bar percentage update
Task
public Task()
- Creates a task.
perform
public void perform()
- Perform this Task.
reverse
public void reverse()
- Reverse this Task.
ignore
public boolean ignore(boolean direction)
- Returns false if this task does not want to be
ignored, or true if this task should be ignored.
If this method returns true, the task will not
be performed or reversed.
- Parameters:
- direction - Forward or reverse. This indicates the
direction the task is being called in.
- Returns:
- true or false, depending on if this
Task should be ignored.
estimatedCompletionTime
public int estimatedCompletionTime(boolean direction)
- An estimation of how long it will take to complete
this task, in milliseconds.
- Parameters:
- direction - Forward or reverse. This allows the task to
specify a different time for each direction.
- Returns:
- The estimated time to complete in milliseconds.
setProgress
protected void setProgress(int progress)
- Set the progress of this task. This method informs the
sequence of this task's progress.
- Parameters:
- progress - The percent complete for this task.
getProgress
public int getProgress()
- get current progress of task
isCancelled
public boolean isCancelled()
- return task cancellation status
initialize
public void initialize(Sequence sequence)
- Initialize this task.
- Parameters:
- sequence - The sequence that manages this task.
getSequence
public Sequence getSequence()
- Returns the Sequence that contains this Task.
- Returns:
- The Sequence.
cancel
public void cancel()
- Cancel this task.
requiresCleanup
public boolean requiresCleanup()
- If the task requires cleanup when the sequence has completed,
this method should return true.
cleanup
public void cleanup()
- This method is called after the sequence has completed, and gives the
task an opportunity to finish. This method will only be called if
requiresCleanup() returns true.
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Add the runtime class requirements to the specified vector.
- Parameters:
- resourceVector - The vector containing resources that this method will add to.
setParentTask
public void setParentTask(Task parent)
- Set the parent Task of this object.
- Parameters:
- parent - The parent of this task.
getParentTask
protected Task getParentTask()
- Returns the parent of this Task.
getWizardState
protected WizardState getWizardState()
- Returns the wizardState that owns this Task.
isCallingClient
public boolean isCallingClient()
- Returns true if this task is currently making a call into the client.
All Packages Class Hierarchy This Package Previous Next Index