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.
-
callerRoute
- The route back to the caller.
-
currentTask
- The current task.
-
FORWARD
- A value that indicates the tasks should be performed.
-
REVERSE
- A value that indicates the tasks should be reversed.
-
sequenceComplete
- A flag indicating whether or not this sequence
has completed execution.
-
sequenceCompleteMethod
- The callback method.
-
sequenceName
- The name of this sequence.
-
sequenceThread
- The thread the tasks will be performed in.
-
tasks
- The list of tasks.
-
taskSequenceCanceled
- A flag indicating whether or not the current
seqence has been canceled.
-
waitForCompletion
- A flag indicating if the caller is waiting for completion.
-
wizardState
- The WizardState that manages this Sequence.
-
Sequence()
- Creates a new, empty sequence.
-
Sequence(Task)
- Convienence constructor to create a new sequence with a single task.
-
addRuntimeResources(Vector)
- Add the runtime class requirements to the specified vector.
-
addTask(Task)
- Adds a task to this sequence.
-
cancel()
- Cancel this sequence.
-
getCallerRoute()
- Returns the Route object that identifies the object that called
on this Sequence to be performed or reversed.
-
getState()
- Returns the WizardState that manages this sequence.
-
initialize(WizardState)
- Initialize this Sequence.
-
isCallingClient()
- Returns true if this Sequence is currently making a call into the client.
-
perform()
- Perform the sequence of tasks.
-
removeTask(Task)
- Removes the specified task from this
sequence.
-
reverse()
- Reverse the sequence of tasks.
FORWARD
public static final boolean FORWARD
- A value that indicates the tasks should be performed.
REVERSE
public static final boolean REVERSE
- A value that indicates the tasks should be reversed.
tasks
protected Vector tasks
- The list of tasks.
wizardState
protected transient WizardState wizardState
- The WizardState that manages this Sequence.
sequenceThread
protected transient Thread sequenceThread
- The thread the tasks will be performed in.
taskSequenceCanceled
protected transient boolean taskSequenceCanceled
- A flag indicating whether or not the current
seqence has been canceled.
sequenceComplete
protected transient boolean sequenceComplete
- A flag indicating whether or not this sequence
has completed execution.
currentTask
protected Task currentTask
- The current task.
callerRoute
protected transient Route callerRoute
- The route back to the caller.
waitForCompletion
protected transient boolean waitForCompletion
- A flag indicating if the caller is waiting for completion.
sequenceName
protected transient String sequenceName
- The name of this sequence.
sequenceCompleteMethod
protected transient String sequenceCompleteMethod
- The callback method.
Sequence
public Sequence()
- Creates a new, empty sequence.
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.
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.
removeTask
public void removeTask(Task task)
- Removes the specified task from this
sequence.
- Parameters:
- task - The task to be removed.
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.
getState
public WizardState getState()
- Returns the WizardState that manages this sequence.
- Returns:
- The wizard state.
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.
perform
public void perform()
- Perform the sequence of tasks. This method returns immediately
unless the waitForCompletion flag is set to true.
reverse
public void reverse()
- Reverse the sequence of tasks. This method returns immediately
unless the waitForCompletion flag is set to true.
cancel
public void cancel()
- Cancel this sequence.
isCallingClient
public boolean isCallingClient()
- Returns true if this Sequence is currently making a call into the client.
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