Packagecom.bourre.commands
Classpublic class ASyncCommandSequencer
InheritanceASyncCommandSequencer Inheritance AbstractSyncCommand Inheritance AbstractCommand
ImplementsASyncCommand, ASyncCommandListener

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The AsyncCommandSequencer manage ASyncCommand execution list.

See also

AbstractSyncCommand.html
ASyncCommand.html
ASyncCommandListener.html


Protected Properties
 PropertyDefined by
 Inherited_bIsRunning : Boolean
A boolean value which indicates if this command is currently processing.
AbstractSyncCommand
 Inherited_eOnCommandEnd : BasicEvent
An event instance used as event object when dispatching the onCommandEnd event to its listener.
AbstractSyncCommand
 Inherited_oEB : EventBroadcaster
The internal event broadcaster.
AbstractSyncCommand
 Inherited_owner : Plugin
A reference to the plugin owner of this command.
AbstractCommand
Public Methods
 MethodDefined by
  
ASyncCommandSequencer(nTimeout:int = -1)
Creates new ASyncCommandSequencer instance.
ASyncCommandSequencer
  
_onTimeout(e:TimerEvent):void
Triggered when a timeout occurs during sequencer processing.
ASyncCommandSequencer
 Inherited
addASyncCommandListener(listener:ASyncCommandListener, ... rest):Boolean
Adds the passed-in listener as listener for the onCommandEnd event of this command.
AbstractSyncCommand
  
addCommand(oCommand:ASyncCommand):Boolean
Adds passed-in command to sequencer.
ASyncCommandSequencer
  
addCommandAfter(indexCommand:ASyncCommand, oCommand:ASyncCommand):Boolean
Adds passed-in command to sequencer after passed-in indexed command in sequencer.
ASyncCommandSequencer
  
addCommandBefore(indexCommand:ASyncCommand, oCommand:ASyncCommand):Boolean
Adds passed-in command to sequencer before passed-in indexed command in sequencer.
ASyncCommandSequencer
  
addCommandEnd(oCommand:ASyncCommand):Boolean
Adds passed-in command at last position in sequencer.
ASyncCommandSequencer
  
addCommandStart(oCommand:ASyncCommand):Boolean
Adds passed-in command in first position in sequencer.
ASyncCommandSequencer
  
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds an event listener for the specified event type.
ASyncCommandSequencer
  
addListener(listener:Object):Boolean
Adds the passed-in listener as listener for all events dispatched by this event broadcaster.
ASyncCommandSequencer
  
clear():void
Clear all the commands list.
ASyncCommandSequencer
  
execute(e:Event = null):void
Starts sequencer execution.
ASyncCommandSequencer
 Inherited
Fires the onCommandEnd event to the listeners of this command.
AbstractSyncCommand
  
getLength():uint
Returns sequencer list size.
ASyncCommandSequencer
 Inherited
Returns the exclusive logger object owned by the plugin.
AbstractCommand
 Inherited
getModel(key:String):AbstractModel
Returns a reference to the model AbstractModel.
AbstractCommand
 Inherited
Returns a reference to the owner of this command.
AbstractCommand
  
Returns the ASyncCommand that running at this time in the sequencer.
ASyncCommandSequencer
 Inherited
getView(key:String):AbstractView
Returns a reference to the view AbstractView.
AbstractCommand
 Inherited
isModelRegistered(key:String):Boolean
Check if a model AbstractModel is registered with passed key in owner's ModelLocator.
AbstractCommand
 Inherited
isRunning():Boolean
Returns true if this command is currently processing.
AbstractSyncCommand
 Inherited
isViewRegistered(key:String):Boolean
Check if a view AbstractView is registered with passed key in owner's ViewLocator.
AbstractCommand
  
onCommandEnd(e:Event):void
Called when the command have completed its process.
ASyncCommandSequencer
 Inherited
Removes the passed-in listener for listening the onCommandEnd event of this command.
AbstractSyncCommand
  
removeCommand(oCommand:ASyncCommand):Boolean
Removes passed-in command from sequencer.
ASyncCommandSequencer
  
removeEventListener(type:String, listener:Object):Boolean
Removes the passed-in listener for listening the specified event.
ASyncCommandSequencer
  
removeListener(listener:Object):Boolean
Removes the passed-in listener object from this event broadcaster.
ASyncCommandSequencer
 Inherited
run():void
Implementation of the Runnable interface, a call to run() is equivalent to a call to execute without argument.
AbstractSyncCommand
 Inherited
setOwner(owner:Plugin):void
Defines the plugin owner of this command.
AbstractCommand
  
toString():String
Returns the string representation of the object.
ASyncCommandSequencer
Protected Methods
 MethodDefined by
  
addCommandAt(index:uint, oCommand:ASyncCommand):Boolean
Adds passed-in command at index position in sequencer.
ASyncCommandSequencer
 Inherited
firePrivateEvent(e:Event):void
Fires a private event directly on this command's owner.
AbstractCommand
Public Constants
 ConstantDefined by
 InheritedonCommandEndEVENT : String = "onCommandEnd"
[static] Name of the event dispatched at the end of the command's process.
AbstractSyncCommand
  onCommandTimeoutEVENT : String = "onCommandTimeout"
[static]
ASyncCommandSequencer
Constructor detail
ASyncCommandSequencer()constructor
public function ASyncCommandSequencer(nTimeout:int = -1)

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates new ASyncCommandSequencer instance.

Parameters
nTimeout:int (default = -1) — Timout detection limit
Method detail
_onTimeout()method
public function _onTimeout(e:TimerEvent):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Triggered when a timeout occurs during sequencer processing.

Parameters
e:TimerEvent — TimerEvent event.
addCommand()method 
public function addCommand(oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command to sequencer.

Parameters
oCommand:ASyncCommand — An ASyncCommand command to add

Returns
Booleantrue if command is successfully added
addCommandAfter()method 
public function addCommandAfter(indexCommand:ASyncCommand, oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command to sequencer after passed-in indexed command in sequencer.

indexCommand must be registered in sequencer to find his position.
The oCommand command is added after indexCommand command.

Parameters
indexCommand:ASyncCommand — Command to search
 
oCommand:ASyncCommand — Command to add after indexCommand command.

Returns
Booleantrue if oCommand is was successfully inserted.
addCommandAt()method 
protected function addCommandAt(index:uint, oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command at index position in sequencer.

Parameters
index:uint — Index for insertion (must be valid)
 
oCommand:ASyncCommand — Command to add

Returns
Booleantrue if oCommand is was successfully inserted.
addCommandBefore()method 
public function addCommandBefore(indexCommand:ASyncCommand, oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command to sequencer before passed-in indexed command in sequencer.

indexCommand must be registered in sequencer to find his position.
The oCommand command is inserted before indexCommand command.

Parameters
indexCommand:ASyncCommand — Command to search
 
oCommand:ASyncCommand — Command to add before indexCommand command.

Returns
Booleantrue if oCommand is was successfully inserted.
addCommandEnd()method 
public function addCommandEnd(oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command at last position in sequencer.

Parameters
oCommand:ASyncCommand — Command to add

Returns
Booleantrue if oCommand is was successfully inserted.
addCommandStart()method 
public function addCommandStart(oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds passed-in command in first position in sequencer.

Parameters
oCommand:ASyncCommand — Command to add

Returns
Booleantrue if oCommand is was successfully inserted.
addEventListener()method 
public function addEventListener(type:String, listener:Object, ... rest):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds an event listener for the specified event type. There is two behaviors for the addEventListener function :

  1. The passed-in listener is an object : The object is added as listener only for the specified event, the object must have a function with the same name than type or at least a handleEvent function.
  2. The passed-in listener is a function : A Delegate object is created and then added as listener for the event type. There is no restriction on the name of the function. If the rest is not empty, all elements in it is used as additional arguments into the delegate object.

Parameters
type:String — name of the event for which register the listener
 
listener:Object — object or function which will receive this event
 
... rest — additional arguments for the function listener

Returns
Booleantrue if the function have been succesfully added as listener fot the passed-in event
addListener()method 
public function addListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in listener as listener for all events dispatched by this event broadcaster. The function returns true if the listener have been added at the end of the call. If the listener is already registered in this event broadcaster the function returns false.

Note : The addListener function doesn't accept functions as listener, functions could only register for a single event.

Parameters
listener:Object — the listener object to add as global listener

Returns
Booleantrue if the listener have been added during this call
clear()method 
public function clear():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Clear all the commands list.

execute()method 
public override function execute(e:Event = null):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Starts sequencer execution.

Parameters
e:Event (default = null) — Ignored in this process
getLength()method 
public function getLength():uint

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns sequencer list size.

Returns
uint — The sequencer list size.
getRunningCommand()method 
public function getRunningCommand():ASyncCommand

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the ASyncCommand that running at this time in the sequencer.

Returns
ASyncCommand — the ASyncCommand that running at this time in the sequencer
onCommandEnd()method 
public function onCommandEnd(e:Event):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Called when the command have completed its process.

Parameters
e:Event — event dispatched by the command
removeCommand()method 
public function removeCommand(oCommand:ASyncCommand):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes passed-in command from sequencer.

Parameters
oCommand:ASyncCommand — Command to remove

Returns
Booleantrue if command was successfully removed.
removeEventListener()method 
public function removeEventListener(type:String, listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener for listening the specified event. The listener could be either an object or a function.

Parameters
type:String — name of the event for which unregister the listener
 
listener:Object — object or function to be unregistered

Returns
Booleantrue if the listener have been successfully removed as listener for the passed-in event
removeListener()method 
public function removeListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener object from this event broadcaster. The object is removed as listener for all events the broadcaster may dispatch.

Parameters
listener:Object — the listener object to remove from this event broadcaster object

Returns
Booleantrue if the object have been successfully removed from this event broadcaster
toString()method 
public override function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of the object.

Returns
String — the string representation of the object
Constant detail
onCommandTimeoutEVENTconstant
public static const onCommandTimeoutEVENT:String = "onCommandTimeout"

Player version: Flash Player 9.0
Language version: ActionScript 3.0