| Package | org.spicefactory.lib.task |
| Class | public class TaskGroup |
| Inheritance | TaskGroup Task flash.events.EventDispatcher |
| Subclasses | ConcurrentTaskGroup, SequentialTaskGroup |
SequentialTaskGroup and ConcurrentTaskGroup.
Manages multiple child tasks and is itself a subclass of Task (Composite Design Pattern)
so that it can be nested within other TaskGroups.
| Property | Defined by | ||
|---|---|---|---|
| autoStart : Boolean
Indicates whether this
TaskGroup starts automatically when
the first child is added. | TaskGroup | ||
![]() | cancelable : Boolean
Indicates whether this Task can be cancelled.
| Task | |
![]() | context : *
An arbitrary value associated with this Task.
| Task | |
| ignoreChildErrors : Boolean
Indicates whether
ERROR events of child tasks should be ignored or if they
should stop the whole group. | TaskGroup | ||
![]() | parent : TaskGroup
The parent of this Task.
| Task | |
![]() | restartable : Boolean
Indicates whether this Task can be restarted.
| Task | |
| size : uint [read-only]
The number of tasks added to this TaskGroup.
| TaskGroup | ||
![]() | skippable : Boolean
Indicates whether this Task can be forced to skip to its final state.
| Task | |
![]() | state : TaskState
The current state of this Task.
| Task | |
![]() | suspendable : Boolean
Indicates whether this Task can be suspended.
| Task | |
| timeout : uint [write-only]
| TaskGroup | ||
| Method | Defined by | ||
|---|---|---|---|
|
Adds the specified task to this TaskGroup.
| TaskGroup | ||
![]() |
cancel():Boolean
Cancels this Task.
| Task | |
|
Returns the Task at the specified index.
| TaskGroup | ||
|
removeAllTasks():void
Removes all tasks from this TaskGroup.
| TaskGroup | ||
|
removeTask(task:Task):Boolean
Removes the specified task from this TaskGroup.
| TaskGroup | ||
![]() |
resume():Boolean
Resumes this Task if it is suspended.
| Task | |
![]() |
skip():Boolean
Forces this Task to move to its final state.
| Task | |
![]() |
start():Boolean
Starts this Task.
| Task | |
![]() |
suspend():Boolean
Suspends this Task.
| Task | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
complete():Boolean
Signals that this Task has completed.
| Task | |
![]() |
doCancel():void
Called before the
CANCEL event gets fired. | Task | |
![]() |
doError(message:String):void
Called before the
ERROR event gets fired. | Task | |
![]() |
doResume():void
Called before the
RESUME event gets fired. | Task | |
![]() |
doSkip():void
Called after
skip has been called but before the COMPLETE event gets fired. | Task | |
![]() |
doStart():void
Called before the
START event gets fired. | Task | |
![]() |
doSuspend():void
Called before the
SUSPEND event gets fired. | Task | |
![]() |
doTimeout():void
Called before the
ERROR event gets fired after a timeout occurred. | Task | |
![]() |
error(message:String):Boolean
Signals an error condition and cancels the Task.
| Task | |
|
handleAddedTask(t:Task):void
Method hook for subclasses that gets called when a child Task was added to this TaskGroup.
| TaskGroup | ||
|
handleRemoveAll():void
Method hook for subclasses that gets called when all child tasks have been removed from
this TaskGroup.
| TaskGroup | ||
|
handleRemovedTask(task:Task, index:uint):void
Method hook for subclasses that gets called when a child Task was removed from this TaskGroup.
| TaskGroup | ||
|
handleTaskComplete(task:Task):void
Method hook for subclasses that gets called when a child Task has completed its operation.
| TaskGroup | ||
![]() |
setCancelable(value:Boolean):void
Specifies whether this Task can be cancelled.
| Task | |
![]() |
setName(name:String):void
Sets the name of this Task.
| Task | |
![]() |
setRestartable(value:Boolean):void
Specifies whether this Task can be restarted.
| Task | |
![]() |
setSkippable(value:Boolean):void
Specifies whether this Task can be forced to skip to its final state.
| Task | |
![]() |
setSuspendable(value:Boolean):void
Specifies whether this Task can be suspended.
| Task | |
![]() |
setTimeout(value:uint):void
Sets the timeout for this Task in milliseconds.
| Task | |
|
Starts the specified child Task.
| TaskGroup | ||
| autoStart | property |
autoStart:Boolean [read-write]
Indicates whether this TaskGroup starts automatically when
the first child is added. This option may be useful for queueing tasks that
must not run concurrently but should be executed as soon as possible.
public function get autoStart():Boolean
public function set autoStart(value:Boolean):void
| ignoreChildErrors | property |
ignoreChildErrors:Boolean [read-write]
Indicates whether ERROR events of child tasks should be ignored or if they
should stop the whole group.
public function get ignoreChildErrors():Boolean
public function set ignoreChildErrors(value:Boolean):void
| size | property |
size:uint [read-only]The number of tasks added to this TaskGroup.
Implementation public function get size():uint
| timeout | property |
timeout:uint [write-only]Implementation
public function set timeout(value:uint):void
| addTask | () | method |
public function addTask(task:Task):BooleanAdds the specified task to this TaskGroup.
Parameterstask:Task — the Task to be added to this TaskGroup
|
Boolean — true if the Task was successfully added to this TaskGroup
|
| getTask | () | method |
public function getTask(index:uint):TaskReturns the Task at the specified index.
Parametersindex:uint — the zero-based index of the Task to return.
|
Task —
the Task at the specified index
|
| handleAddedTask | () | method |
protected function handleAddedTask(t:Task):voidMethod hook for subclasses that gets called when a child Task was added to this TaskGroup.
Parameterst:Task — the Task that was added to this TaskGroup
|
| handleRemoveAll | () | method |
protected function handleRemoveAll():voidMethod hook for subclasses that gets called when all child tasks have been removed from this TaskGroup.
| handleRemovedTask | () | method |
protected function handleRemovedTask(task:Task, index:uint):voidMethod hook for subclasses that gets called when a child Task was removed from this TaskGroup.
Parameterstask:Task — the Task that was removed from this TaskGroup
|
|
index:uint — the zero-based index of the removed Task
|
| handleTaskComplete | () | method |
protected function handleTaskComplete(task:Task):voidMethod hook for subclasses that gets called when a child Task has completed its operation.
Parameterstask:Task — the Task that has completed its operation
|
| removeAllTasks | () | method |
public function removeAllTasks():voidRemoves all tasks from this TaskGroup.
| removeTask | () | method |
public function removeTask(task:Task):BooleanRemoves the specified task from this TaskGroup.
Parameterstask:Task — the Task to be removed from this TaskGroup
|
Boolean — false if the Task was successfully removed from this TaskGroup
|
| startTask | () | method |
protected function startTask(task:Task):voidStarts the specified child Task.
Parameterstask:Task — the Task that should be started
|