Packageorg.spicefactory.lib.command.flow
Interfacepublic interface CommandFlow extends CommandExecutor, SuspendableCommand, CancellableCommand
Implementors DefaultCommandFlow

Represents a flow that executes multiple commands with a dynamic execution order that depends on links that decide which command to execute next, usually based on the result of the preceding command.

For creating a simple linear sequence of commands you should create a CommandGroup instead.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only] Indicates whether this command is currently executing.
AsyncCommand
 Inheritedcancellable : Boolean
[read-only] Indicates whether this executor can be cancelled.
CommandExecutor
 Inheritedsuspendable : Boolean
[read-only] Indicates whether this executor can be suspended.
CommandExecutor
 Inheritedsuspended : Boolean
[read-only] Indicates whether this command is currently suspended.
SuspendableCommand
Public Methods
 MethodDefined By
  
addLink(command:Command, link:CommandLink):void
Adds a command and associated link to this flow.
CommandFlow
 Inherited
cancel():void
Cancels the command.
CancellableCommand
 Inherited
prepare(lifecycle:CommandLifecycle, data:CommandData):void
Method that may be called by frameworks before executing this command to hook into the lifecycle and data handling of this executor.
CommandExecutor
 Inherited
resume():void
Resumes the command.
SuspendableCommand
  
Sets the default link to use when a command in the flow has no matching link.
CommandFlow
 Inherited
suspend():void
Suspends the command.
SuspendableCommand
Method Detail
addLink()method
public function addLink(command:Command, link:CommandLink):void

Adds a command and associated link to this flow. The link is invoked after the specified command finished executing and should determine the next command to execute (or end the flow execution).

The first invocation of this method also specifies the first command to execute in this flow.

Parameters

command:Command — the command to add to the flow
 
link:CommandLink — the link associated with the command

setDefaultLink()method 
public function setDefaultLink(link:CommandLink):void

Sets the default link to use when a command in the flow has no matching link.

Parameters

link:CommandLink — the default link to use when a command in the flow has no matching link