ASyncBatch
| Kind of class: | public class |
|---|---|
| Package: | com.bourre.commands |
| Inherits from: | AbstractSyncCommand < AbstractCommand |
| Implements: | |
| Known subclasses: | |
| Author: | Cédric Néhémie |
| Classpath: | com.bourre.commands.ASyncBatch |
| File last modified: | Monday, 24 November 2008, 11:36:52 |
An asynchronous batch behave as a normal batch, but is designed to handle
asynchronous commands. A command executed by this batch could only start
when the previous command have fire its
asynchronous commands. A command executed by this batch could only start
when the previous command have fire its
onCommandEnd event.The Event object received in the execute is passed
to each commands contained in this batch.
The ASyncBatch class extends AbstractSyncCommandand so, dispatch an onCommandEnd event at the execution end
of all commands.
Summary
Constructor
Instance methods
- setOwner (owner:Plugin) : void
- addCommand (command:Command) : Boolean
- removeCommand (command:Command) : Boolean
- execute (e:Event = null) : void
- Starts the execution of the batch.
Event handlers
- onCommandEnd (e:Event) : void
- Receive events from its internal asynchronous commands.
Constructor
ASyncBatch
public function ASyncBatch (
)
Creates a new asynchronous batch object.
Instance methods
addCommand
execute
override public function execute (
e:Event = null) : void
Starts the execution of the batch. The received event
is registered and then passed to sub commands.
is registered and then passed to sub commands.
Parameters:
e:
An event that will be used as data source by the command.
#Overrides:
- AbstractSyncCommand.execute
Throws:
- {VISDOC_LINK_0}#
execute— Stateless command use the passed-in event
as data source for its execution, so the event must provide the right data for
the currentASyncBatchobject.
Specified by:
removeCommand
setOwner
Overrides:
- AbstractSyncCommand.setOwner
Event handlers
onCommandEnd
public function onCommandEnd (
e:Event) : void
Receive events from its internal asynchronous commands.
Parameters:
e:
event dispatched by the command
#Specified by: