Packageorg.spicefactory.lib.task.util
Classpublic class CommandTask
InheritanceCommandTask Inheritance Task Inheritance flash.events.EventDispatcher

Task implementation that wraps a synchronous Command. Useful if you need to add some kind of synchronous operation to a TaskGroup.



Public Properties
 PropertyDefined by
 Inheritedcancelable : Boolean
Indicates whether this Task can be cancelled.
Task
 Inheritedcontext : *
An arbitrary value associated with this Task.
Task
 Inheritedparent : TaskGroup
The parent of this Task.
Task
 Inheritedrestartable : Boolean
Indicates whether this Task can be restarted.
Task
 Inheritedskippable : Boolean
Indicates whether this Task can be forced to skip to its final state.
Task
 Inheritedstate : TaskState
The current state of this Task.
Task
 Inheritedsuspendable : Boolean
Indicates whether this Task can be suspended.
Task
 Inheritedtimeout : uint
The timeout for this Task in milliseconds.
Task
Public Methods
 MethodDefined by
  
CommandTask(command:Command, name:String = "[CommandTask]")
Creates a new Task that wraps the specified synchronous Command.
CommandTask
 Inherited
cancel():Boolean
Cancels this Task.
Task
 Inherited
resume():Boolean
Resumes this Task if it is suspended.
Task
 Inherited
skip():Boolean
Forces this Task to move to its final state.
Task
 Inherited
start():Boolean
Starts this Task.
Task
 Inherited
suspend():Boolean
Suspends this Task.
Task
Protected Methods
 MethodDefined by
 Inherited
complete():Boolean
Signals that this Task has completed.
Task
 Inherited
doCancel():void
Called before the CANCEL event gets fired.
Task
 Inherited
doError(message:String):void
Called before the ERROR event gets fired.
Task
 Inherited
doResume():void
Called before the RESUME event gets fired.
Task
 Inherited
doSkip():void
Called after skip has been called but before the COMPLETE event gets fired.
Task
 Inherited
doStart():void
Called before the START event gets fired.
Task
 Inherited
doSuspend():void
Called before the SUSPEND event gets fired.
Task
 Inherited
doTimeout():void
Called before the ERROR event gets fired after a timeout occurred.
Task
 Inherited
error(message:String):Boolean
Signals an error condition and cancels the Task.
Task
 Inherited
setCancelable(value:Boolean):void
Specifies whether this Task can be cancelled.
Task
 Inherited
setName(name:String):void
Sets the name of this Task.
Task
 Inherited
setRestartable(value:Boolean):void
Specifies whether this Task can be restarted.
Task
 Inherited
setSkippable(value:Boolean):void
Specifies whether this Task can be forced to skip to its final state.
Task
 Inherited
setSuspendable(value:Boolean):void
Specifies whether this Task can be suspended.
Task
 Inherited
setTimeout(value:uint):void
Sets the timeout for this Task in milliseconds.
Task
Events
 EventSummaryDefined by
 Inherited Dispatched when a Task is cancelled.Task
 Inherited Dispatched when a Task has completed its execution.Task
 Inherited Dispatched when a Task has aborted due to an error condition.Task
 Inherited Dispatched when a suspended Task is resumed.Task
 Inherited Dispatched when a Task is started.Task
 Inherited Dispatched when a Task is suspended.Task
Constructor detail
CommandTask()constructor
public function CommandTask(command:Command, name:String = "[CommandTask]")

Creates a new Task that wraps the specified synchronous Command.

Parameters
command:Command — the Command to execute when the Task is started
 
name:String (default = "[CommandTask]") — an optional name for this CommandTask for log output