Package | com.rosettastone.library.taskmanager |
Class | public class InterruptibleTaskManager |
Inheritance | InterruptibleTaskManager ![]() ![]() ![]() |
Implements | IInterruptibleTask |
Method | Defined By | ||
---|---|---|---|
Constructor. | InterruptibleTaskManager | ||
addTask(task:IInterruptibleTask, dependencies:Array = null):void
Adds a task to the graph and set its dependencies. | InterruptibleTaskManager | ||
![]() |
Executes the specified tasks when the current task is executed. | Task | |
![]() | Task | ||
![]() | interrupt():Boolean [override]
Interruptible tasks should override interrupt() and get interruptible() if they are interruptible. | AbstractTaskManager | |
![]() | interruptForTask(interruptingTask:ITask):Boolean
Interrupts the current Task to wait on the Task specified. | Task | |
![]() |
Executes the specified tasks if the current task fails. | Task | |
removeTask(taskToRemove:IInterruptibleTask):void
Removes a task from the task manager. | InterruptibleTaskManager | ||
![]() | reset():void
Resets the task to it's pre-run state. | Task | |
![]() |
Starts a task. | Task | |
![]() |
Executes the specified tasks once the current task has completed successfully. | Task | |
![]() | withCompleteHandler(completeHandler:Function):ITask
Although tasks dispatch TaskEvents to indicate completion, this method may also be used for notification purposes. | Task | |
![]() | withErrorHandler(errorHandler:Function):ITask
Although tasks dispatch TaskEvents to indicate failure, this method may also be used for notification purposes. | Task | |
![]() | withFinalHandler(finalHandler:Function):ITask
This handler is invoked upon either success or failure of the Task. | Task | |
![]() | withInterruptionHandler(interruptionHandler:Function):ITask | Task | |
![]() | withStartedHandler(startedHandler:Function):ITask
Although tasks dispatch TaskEvents to indicate starting, this method may also be used for notification purposes. | Task |
InterruptibleTaskManager | () | Constructor |
public function InterruptibleTaskManager()
Constructor.
addTask | () | method |
public function addTask(task:IInterruptibleTask, dependencies:Array = null):void
Adds a task to the graph and set its dependencies. If TaskManager is currently running and the specified Taks has invalid dependencies, an ERROR event will be dispatched immediately.
Parameters
task:IInterruptibleTask — Task to add to TaskManager
| |
dependencies:Array (default = null ) — Array of Tasks that newly added Task depends on
|
Error — if TaskManager has been configured for interruptible-mode and Task is not either interruptible or synchronous
|
removeTask | () | method |
public function removeTask(taskToRemove:IInterruptibleTask):void
Removes a task from the task manager. If the TaskManager is running and this operation unblocks any of the remaining Tasks, they will be executed as a result of this removal.
Parameters
taskToRemove:IInterruptibleTask — The task to remove
|