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

Package | org.spicefactory.lib.task.util
Class | public class SynchronousDelegateTask
Inheritance | SynchronousDelegateTask Task 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | cancelable : Boolean [read-only] Indicates whether this Task can be cancelled. | Task
|  | data : * An arbitrary value associated with this Task. | Task
|  | parent : TaskGroup [read-only] The parent of this Task. | Task
|  | restartable : Boolean [read-only] Indicates whether this Task can be restarted. | Task
|  | root : Task [read-only] The root TaskGroup in case this Task is nested in one or more TaskGroups. | Task
|  | skippable : Boolean [read-only] Indicates whether this Task can be forced to skip to its final state. | Task
|  | state : TaskState [read-only] The current state of this Task. | Task
|  | suspendable : Boolean [read-only] Indicates whether this Task can be suspended. | Task
|  | timeout : uint [read-only] The timeout for this Task in milliseconds. | Task

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | SynchronousDelegateTask(delegate:Delegate, name:String = [CommandTask]) Creates a new Task that wraps the specified synchronous Delegate. | SynchronousDelegateTask
|  | cancel():Boolean Cancels this Task. | Task
|  | 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

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

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

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | cancel | Dispatched when a Task is cancelled. | Task
|  | complete | Dispatched when a Task has completed its execution. | Task
|  | error | Dispatched when a Task has aborted due to an error condition. | Task
|  | resume | Dispatched when a suspended Task is resumed. | Task
|  | start | Dispatched when a Task is started. | Task
|  | suspend | Dispatched when a Task is suspended. | Task

Constructor Detail

SynchronousDelegateTask | () | Constructor

`public function SynchronousDelegateTask(delegate:Delegate, name:String = [CommandTask])`

Creates a new Task that wraps the specified synchronous Delegate.

Parameters

| `delegate:Delegate` — the Delegate to execute when the Task is started
| `name:String` (default = `[CommandTask]`)`` — an optional name for this CommandTask for log output

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