Command

Kind of class:public interface
Package:com.bourre.commands
Inherits from:none
Implemented by:
Known subinterfaces:
Author:Francis Bourre
Classpath:com.bourre.commands.Command
File last modified:Monday, 24 November 2008, 11:36:52
Encapsulate a request as an object, thereby letting you parameterize
clients with different requests, queue or log requests,
and support undoable operations.

Commands are named state-less when they can work
only from the passed-in event in the execute method without
having to define any parameters in the constructor.

Commands can be asynchronous by implementing the ASyncCommandinterface.

See the How to use the Command
pattern implementation in LowRA
document for more details on
the commands package structure.

See also:

Summary


Instance methods
  • execute (e:Event = null) : void
    • Execute the request according to the current command data.

Instance methods

execute

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

Execute the request according to the current command data.

Stateless commands may use the passed-in event object
as data source for its execution. If the execution can't
be performed because of unreachable data the command have
to throw an error.

Parameters:
e:
An event that will be used as data source by the command.
Throws:
  • {VISDOC_LINK_0}UnreachableDataException — Stateless command use the passed-in event
    as data source for its execution, so the event must provide the right data for
    the current Command object.