Packagecom.adobe.cairngorm.task
Interfacepublic interface ITask extends flash.events.IEventDispatcher
Implementors Task

A task performs some task when the start() method is called. If the task completes successfully, the taskComplete event is dispatched, if a fault occurs then the taskFault event is dispatched. During progressing taskProgress events are dispatched. The granularity of these depends on the concrete implementation.



Public Properties
 PropertyDefined By
  currentState : String
[read-only] Gets the current state of the task.
ITask
  enabled : Boolean
Enables or disables the taskgroup task.
ITask
  label : String
A label associated with the task.
ITask
Public Methods
 MethodDefined By
  
start():void
Starts processing the task-item.
ITask
Events
 Event Summary Defined By
  Dispatched when the currentState property has changed value.ITask
  Dispatched when the task has been completed.ITask
  Dispatched when a fault has occurred while performing the task.ITask
  Dispatched when the task has started after the start() method of the task has been invoked.ITask
Property Detail
currentStateproperty
currentState:String  [read-only]

Gets the current state of the task. The values are defined as constants on the TaskState class.


Implementation
    public function get currentState():String
enabledproperty 
enabled:Boolean

Enables or disables the taskgroup task. Only enabled task group tasks will be processed.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
labelproperty 
label:String

A label associated with the task.


Implementation
    public function get label():String
    public function set label(value:String):void
Method Detail
start()method
public function start():void

Starts processing the task-item.

Event Detail
currentStateChange Event
Event Object Type: mx.events.StateChangeEvent

Dispatched when the currentState property has changed value.

taskComplete Event  
Event Object Type: com.adobe.cairngorm.task.TaskEvent

Dispatched when the task has been completed.

taskFault Event  
Event Object Type: com.adobe.cairngorm.task.TaskEvent

Dispatched when a fault has occurred while performing the task.

taskStart Event  
Event Object Type: com.adobe.cairngorm.task.TaskEvent

Dispatched when the task has started after the start() method of the task has been invoked.