Packageorg.spicefactory.lib.task
Classpublic class SequentialTaskGroup
InheritanceSequentialTaskGroup Inheritance TaskGroup Inheritance Task Inheritance flash.events.EventDispatcher

A TaskGroup implementation that executes its child Tasks sequentially. When the last child Task has completed its operation this TaskGroup will fire its COMPLETE event. If the TaskGroup gets cancelled or suspended the currently active child task will also be cancelled or suspended in turn. If a child Task throws an ERROR event and the ignoreChildErrors property of this TaskGroup is set to false, then the TaskGroup will fire an ERROR event and will not execute its remaining child tasks. If the autoStart property of this TaskGroup is set to true, the TaskGroup will automatically be started if a child task gets added to an empty chain.



Public Properties
 PropertyDefined By
 InheritedautoStart : Boolean
Indicates whether this TaskGroup starts automatically when the first child is added.
TaskGroup
 Inheritedcancelable : Boolean
[read-only] Indicates whether this Task can be cancelled.
Task
 Inheriteddata : *
An arbitrary value associated with this Task.
Task
 InheritedignoreChildErrors : Boolean
Indicates whether ERROR events of child tasks should be ignored or if they should stop the whole group.
TaskGroup
 Inheritedparent : TaskGroup
[read-only] The parent of this Task.
Task
 Inheritedrestartable : Boolean
[read-only] Indicates whether this Task can be restarted.
Task
 Inheritedroot : Task
[read-only] The root TaskGroup in case this Task is nested in one or more TaskGroups.
Task
 Inheritedsize : uint
[read-only] The number of tasks added to this TaskGroup.
TaskGroup
 Inheritedskippable : Boolean
[read-only] Indicates whether this Task can be forced to skip to its final state.
Task
 Inheritedstate : TaskState
[read-only] The current state of this Task.
Task
 Inheritedsuspendable : Boolean
[read-only] Indicates whether this Task can be suspended.
Task
 Inheritedtimeout : uint
TaskGroup
Public Methods
 MethodDefined By
  
SequentialTaskGroup(name:String = null)
Creates a new TaskGroup.
SequentialTaskGroup
 Inherited
addTask(task:Task):Boolean
Adds the specified task to this TaskGroup.
TaskGroup
 Inherited
cancel():Boolean
Cancels this Task.
Task
 Inherited
getTask(index:uint):Task
Returns the Task at the specified index.
TaskGroup
 Inherited
Removes all tasks from this TaskGroup.
TaskGroup
 Inherited
removeTask(task:Task):Boolean
Removes the specified task from this TaskGroup.
TaskGroup
 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
Method hook for subclasses that gets called when a child Task was added to this TaskGroup.
TaskGroup
 Inherited
Method hook for subclasses that gets called when all child tasks have been removed from this TaskGroup.
TaskGroup
 Inherited
handleRemovedTask(task:Task, index:uint):void
Method hook for subclasses that gets called when a child Task was removed from this TaskGroup.
TaskGroup
 Inherited
Method hook for subclasses that gets called when a child Task has completed its operation.
TaskGroup
 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
 Inherited
startTask(task:Task):void
Starts the specified child Task.
TaskGroup
Events
 Event Summary Defined By
 InheritedDispatched when a Task is cancelled.Task
 InheritedDispatched when a Task has completed its execution.Task
 InheritedDispatched when a Task has aborted due to an error condition.Task
 InheritedDispatched when a suspended Task is resumed.Task
 InheritedDispatched when a Task is started.Task
 InheritedDispatched when a Task is suspended.Task
Constructor Detail
SequentialTaskGroup()Constructor
public function SequentialTaskGroup(name:String = null)

Creates a new TaskGroup.

Parameters
name:String (default = null) — an optional name for log output