All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.core.Sequence

java.lang.Object
   |
   +----com.sun.wizards.core.Sequence

public class Sequence
extends Object
implements Serializable
Sequence is object that maintains a sequence of tasks that can be performed either in order or in reverse order. The tasks are always performed on the server that the WizardState is running on.


Variable Index

 o callerRoute
The route back to the caller.
 o currentTask
The current task.
 o FORWARD
A value that indicates the tasks should be performed.
 o REVERSE
A value that indicates the tasks should be reversed.
 o sequenceComplete
A flag indicating whether or not this sequence has completed execution.
 o sequenceCompleteMethod
The callback method.
 o sequenceName
The name of this sequence.
 o sequenceThread
The thread the tasks will be performed in.
 o tasks
The list of tasks.
 o taskSequenceCanceled
A flag indicating whether or not the current seqence has been canceled.
 o waitForCompletion
A flag indicating if the caller is waiting for completion.
 o wizardState
The WizardState that manages this Sequence.

Constructor Index

 o Sequence()
Creates a new, empty sequence.
 o Sequence(Task)
Convienence constructor to create a new sequence with a single task.

Method Index

 o addRuntimeResources(Vector)
Add the runtime class requirements to the specified vector.
 o addTask(Task)
Adds a task to this sequence.
 o cancel()
Cancel this sequence.
 o getCallerRoute()
Returns the Route object that identifies the object that called on this Sequence to be performed or reversed.
 o getState()
Returns the WizardState that manages this sequence.
 o initialize(WizardState)
Initialize this Sequence.
 o isCallingClient()
Returns true if this Sequence is currently making a call into the client.
 o perform()
Perform the sequence of tasks.
 o removeTask(Task)
Removes the specified task from this sequence.
 o reverse()
Reverse the sequence of tasks.

Variables

 o FORWARD
 public static final boolean FORWARD
A value that indicates the tasks should be performed.

 o REVERSE
 public static final boolean REVERSE
A value that indicates the tasks should be reversed.

 o tasks
 protected Vector tasks
The list of tasks.

 o wizardState
 protected transient WizardState wizardState
The WizardState that manages this Sequence.

 o sequenceThread
 protected transient Thread sequenceThread
The thread the tasks will be performed in.

 o taskSequenceCanceled
 protected transient boolean taskSequenceCanceled
A flag indicating whether or not the current seqence has been canceled.

 o sequenceComplete
 protected transient boolean sequenceComplete
A flag indicating whether or not this sequence has completed execution.

 o currentTask
 protected Task currentTask
The current task.

 o callerRoute
 protected transient Route callerRoute
The route back to the caller.

 o waitForCompletion
 protected transient boolean waitForCompletion
A flag indicating if the caller is waiting for completion.

 o sequenceName
 protected transient String sequenceName
The name of this sequence.

 o sequenceCompleteMethod
 protected transient String sequenceCompleteMethod
The callback method.

Constructors

 o Sequence
 public Sequence()
Creates a new, empty sequence.

 o Sequence
 public Sequence(Task task)
Convienence constructor to create a new sequence with a single task. Other tasks may also be added.

Parameters:
task - The task to add to the new sequence.

Methods

 o addTask
 public void addTask(Task task)
Adds a task to this sequence. The order that the tasks are added to the Sequence is maintained, and when the Sequence is performed, the tasks will be performed in the same order. If the Sequence is reversed, the tasks will be reversed in the opposite order from how they were added to the Sequence.

Parameters:
task - The task to be added to this sequence.
 o removeTask
 public void removeTask(Task task)
Removes the specified task from this sequence.

Parameters:
task - The task to be removed.
 o initialize
 public void initialize(WizardState wizardState)
Initialize this Sequence. This method is called by the WizardState object after the Sequences have been deserialized from the wizard archive.

Parameters:
wizardState - The WizardState that owns this Sequence.
 o getState
 public WizardState getState()
Returns the WizardState that manages this sequence.

Returns:
The wizard state.
 o getCallerRoute
 public Route getCallerRoute()
Returns the Route object that identifies the object that called on this Sequence to be performed or reversed.

Returns:
The Route object that identifies the caller.
 o perform
 public void perform()
Perform the sequence of tasks. This method returns immediately unless the waitForCompletion flag is set to true.

 o reverse
 public void reverse()
Reverse the sequence of tasks. This method returns immediately unless the waitForCompletion flag is set to true.

 o cancel
 public void cancel()
Cancel this sequence.

 o isCallingClient
 public boolean isCallingClient()
Returns true if this Sequence is currently making a call into the client.

 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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index