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

public function addCommand (
command:Command) : Boolean

Parameters:
command:
command to add in this macro command
#
Returns:
  • onCommandEnd if the command have been
    succesfully added. The true ensure that the command exist in the macro
    command at the end of the call
    #

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.
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 current ASyncBatch object.
    #
Specified by:

removeCommand

public function removeCommand (
command:Command) : Boolean

Parameters:
command:
command to remove from this macro command
#
Returns:
  • true if the command have been
    succesfully removed
    #

setOwner

override public function setOwner (
owner:Plugin) : void

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
#