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.


Variable Index

 o parent
The parent Task of this object. Deprecated.
 o progress
Local cache of last progress bar percentage update Deprecated.
 o sequence
The sequence of tasks that manages this task. Deprecated.
 o threadInClient
A flag that indicates if the task is currently making a client call. Deprecated.
 o wizardState
The WizardState object that owns the sequence. Deprecated.

Constructor Index

 o Task()
Creates a task.

Method Index

 o addRuntimeResources(Vector)
Add the runtime class requirements to the specified vector.
 o cancel()
Cancel this task.
 o cleanup()
This method is called after the sequence has completed, and gives the task an opportunity to finish.
 o estimatedCompletionTime(boolean)
An estimation of how long it will take to complete this task, in milliseconds.
 o getParentTask()
Returns the parent of this Task.
 o getProgress()
get current progress of task
 o getSequence()
Returns the Sequence that contains this Task.
 o getWizardState()
Returns the wizardState that owns this Task.
 o ignore(boolean)
Returns false if this task does not want to be ignored, or true if this task should be ignored.
 o initialize(Sequence)
Initialize this task.
 o isCallingClient()
Returns true if this task is currently making a call into the client.
 o isCancelled()
return task cancellation status
 o perform()
Perform this Task.
 o requiresCleanup()
If the task requires cleanup when the sequence has completed, this method should return true.
 o reverse()
Reverse this Task.
 o setParentTask(Task)
Set the parent Task of this object.
 o setProgress(int)
Set the progress of this task.

Variables

 o parent
 protected Task parent
Note: parent is deprecated.

The parent Task of this object.

 o sequence
 protected transient Sequence sequence
Note: sequence is deprecated.

The sequence of tasks that manages this task.

 o wizardState
 protected transient WizardState wizardState
Note: wizardState is deprecated.

The WizardState object that owns the sequence.

 o threadInClient
 protected transient Boolean threadInClient
Note: threadInClient is deprecated.

A flag that indicates if the task is currently making a client call.

 o progress
 protected transient int progress
Note: progress is deprecated.

Local cache of last progress bar percentage update

Constructors

 o Task
 public Task()
Creates a task.

Methods

 o perform
 public void perform()
Perform this Task.

 o reverse
 public void reverse()
Reverse this Task.

 o 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.
 o 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.
 o 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.
 o getProgress
 public int getProgress()
get current progress of task

 o isCancelled
 public boolean isCancelled()
return task cancellation status

 o initialize
 public void initialize(Sequence sequence)
Initialize this task.

Parameters:
sequence - The sequence that manages this task.
 o getSequence
 public Sequence getSequence()
Returns the Sequence that contains this Task.

Returns:
The Sequence.
 o cancel
 public void cancel()
Cancel this task.

 o requiresCleanup
 public boolean requiresCleanup()
If the task requires cleanup when the sequence has completed, this method should return true.

 o 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.

 o 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.
 o setParentTask
 public void setParentTask(Task parent)
Set the parent Task of this object.

Parameters:
parent - The parent of this task.
 o getParentTask
 protected Task getParentTask()
Returns the parent of this Task.

 o getWizardState
 protected WizardState getWizardState()
Returns the wizardState that owns this Task.

 o 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