GODPAPER | All Packages | All Classes | Index | Frames No Frames |
ITask

Package | com.adobe.cairngorm.task
Interface | public 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

| Property | Defined 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

| Method | Defined By
--- | --- | ---
|  | start():void Starts processing the task-item. | ITask

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | currentStateChange | Dispatched when the currentState property has changed value. | ITask
|  | taskComplete | Dispatched when the task has been completed. | ITask
|  | taskFault | Dispatched when a fault has occurred while performing the task. | ITask
|  | taskStart | Dispatched when the task has started after the start() method of the task has been invoked. | ITask

Property Detail

currentState | property

`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`

enabled | property |

`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`

label | property |

`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.

Thu Jan 16 2014, 01:11 PM +08:00