Packagegugga.tasks.containers.taskManager
Classpublic class TaskManagerItem
InheritanceTaskManagerItem Inheritance flash.events.EventDispatcher
ImplementsITask

This is an internal class used only by the TaskManager class. TaskManagerItem is a task, composed by two tasks:



Public Properties
 PropertyDefined by
  ImmediatelyInterruptable : Boolean
[read-only]
TaskManagerItem
  mState : TaskManagerItemStates
TaskManagerItem
  ScheduledTask : ITask
TaskManagerItem
Public Methods
 MethodDefined by
  
TaskManagerItem(aScheduledTask:ITask, aAccepting:Boolean)
TaskManagerItem
  
TaskManagerItem
  
acceptPrecondition(aPrecondition:EventDescriptor):void
TaskManagerItem
  
acceptPreconditionsByEventSource(aEventSource:IEventDispatcher):void
TaskManagerItem
  
addPrecondition(aPrecondition:EventDescriptor):void
TaskManagerItem
  
dispose():void
TaskManagerItem
  
TaskManagerItem
  
ignorePrecondition(aPrecondition:EventDescriptor):void
TaskManagerItem
  
ignorePreconditionsByEventSource(aEventSource:IEventDispatcher):void
TaskManagerItem
  
interrupt():void
TODO: Should examine case when changing ScheduledTask while interrupting

interrupt() will check whether the TaskManagerItem state is TaskManagerItemStates.Running.

TaskManagerItem
  
isImmediatelyInterruptable() always returns true when TaskManagerItem is not in TaskManagerItemStates.Running state.
TaskManagerItem
  
isRunning():Boolean
TODO: Should be implemented.
TaskManagerItem
  
removePrecondition(aPrecondition:EventDescriptor):void
TaskManagerItem
  
removePreconditionsByEventSource(aEventSource:IEventDispatcher):void
TaskManagerItem
  
replacePreconditionsEventSource(aEventSource:IEventDispatcher, aNewEventSource:IEventDispatcher):void
TaskManagerItem
  
reset():void
TaskManagerItem
  
start():void
TaskManagerItem
Events
 EventSummaryDefined by
    TaskManagerItem
    TaskManagerItem
    TaskManagerItem
Property detail
ImmediatelyInterruptableproperty
ImmediatelyInterruptable:Boolean  [read-only]Implementation
    public function get ImmediatelyInterruptable():Boolean
mStateproperty 
public var mState:TaskManagerItemStates
ScheduledTaskproperty 
ScheduledTask:ITask  [read-write]Implementation
    public function get ScheduledTask():ITask
    public function set ScheduledTask(value:ITask):void
Constructor detail
TaskManagerItem()constructor
public function TaskManagerItem(aScheduledTask:ITask, aAccepting:Boolean)Parameters
aScheduledTask:ITask
 
aAccepting:Boolean
Method detail
acceptAllPreconditions()method
public function acceptAllPreconditions():void
acceptPrecondition()method 
public function acceptPrecondition(aPrecondition:EventDescriptor):voidParameters
aPrecondition:EventDescriptor
acceptPreconditionsByEventSource()method 
public function acceptPreconditionsByEventSource(aEventSource:IEventDispatcher):voidParameters
aEventSource:IEventDispatcher
addPrecondition()method 
public function addPrecondition(aPrecondition:EventDescriptor):voidParameters
aPrecondition:EventDescriptor
dispose()method 
public function dispose():void
ignoreAllPreconditions()method 
public function ignoreAllPreconditions():void
ignorePrecondition()method 
public function ignorePrecondition(aPrecondition:EventDescriptor):voidParameters
aPrecondition:EventDescriptor
ignorePreconditionsByEventSource()method 
public function ignorePreconditionsByEventSource(aEventSource:IEventDispatcher):voidParameters
aEventSource:IEventDispatcher
interrupt()method 
public function interrupt():void

TODO: Should examine case when changing ScheduledTask while interrupting

interrupt() will check whether the TaskManagerItem state is TaskManagerItemStates.Running.

If in running state, it will check whether the scheduled task is isImmediatelyInterruptable and if it isn't, it will create a listener which is subscribed to the interrupted event of the scheduled task - the TaskManagerItem will be interrupted right after this event is caught and consumed. If the scheduled task is isImmediatelyInterruptable it will be directly interrupted, and right after it, the TaskManagerItem will be also interrupted.

If not in running state, it will interrupt the preconditions task, before putting TaskManagerItem in interrupted state.

isImmediatelyInterruptable()method 
public function isImmediatelyInterruptable():Boolean

isImmediatelyInterruptable() always returns true when TaskManagerItem is not in TaskManagerItemStates.Running state. When TaskManagerItem is in TaskManagerItemStates.Running state, isImmediatelyInterruptable() returns true only if the scheduled task is immediately interruptable.

Returns
Boolean
isRunning()method 
public function isRunning():Boolean

TODO: Should be implemented.

Returns
Boolean
removePrecondition()method 
public function removePrecondition(aPrecondition:EventDescriptor):voidParameters
aPrecondition:EventDescriptor
removePreconditionsByEventSource()method 
public function removePreconditionsByEventSource(aEventSource:IEventDispatcher):voidParameters
aEventSource:IEventDispatcher
replacePreconditionsEventSource()method 
public function replacePreconditionsEventSource(aEventSource:IEventDispatcher, aNewEventSource:IEventDispatcher):voidParameters
aEventSource:IEventDispatcher
 
aNewEventSource:IEventDispatcher
reset()method 
public function reset():void

See also

gugga.tasks.PreconditionsManager.reset()
start()method 
public function start():void
Event detail
completedevent 
Event object type: TaskEvent

interruptedevent  
Event object type: TaskEvent

startevent  
Event object type: TaskEvent