Package | org.spicefactory.lib.command.base |
Class | public class AbstractAsyncCommand |
Inheritance | AbstractAsyncCommand flash.events.EventDispatcher |
Implements | AsyncCommand |
Subclasses | AbstractCancellableCommand |
A subclass of AbstractAsyncCommand is expected
to override the doStart
method, do its work and then call complete
when the operation is done (or error
when the command fails to complete successfully).
Property | Defined By | ||
---|---|---|---|
active : Boolean [read-only]
Indicates whether this command is currently executing. | AbstractAsyncCommand |
Method | Defined By | ||
---|---|---|---|
AbstractAsyncCommand(description:String = null)
Creates a new instance. | AbstractAsyncCommand | ||
execute():void
Starts the execution of this command. | AbstractAsyncCommand |
Method | Defined By | ||
---|---|---|---|
complete(result:Object = null):void
Signals that this command has completed. | AbstractAsyncCommand | ||
doExecute():void
Invoked when the command starts executing. | AbstractAsyncCommand | ||
error(cause:Object = null):void
Signals an error condition and cancels the command. | AbstractAsyncCommand |
active | property |
active:Boolean
[read-only] Indicates whether this command is currently executing.
public function get active():Boolean
AbstractAsyncCommand | () | Constructor |
public function AbstractAsyncCommand(description:String = null)
Creates a new instance.
Parametersdescription:String (default = null ) — a description of this command
|
complete | () | method |
protected function complete(result:Object = null):void
Signals that this command has completed. Subclasses should call this method when the asynchronous operation has completed.
Parameters
result:Object (default = null )
|
doExecute | () | method |
protected function doExecute():void
Invoked when the command starts executing. Subclasses should override this method to start with the actual operation this command performs.
error | () | method |
protected function error(cause:Object = null):void
Signals an error condition and cancels the command. Subclasses should call this method when the asynchronous operation cannot be successfully completed.
Parameters
cause:Object (default = null ) — the cause of the error
|
execute | () | method |
public function execute():void
Starts the execution of this command. If this command is member of a group or flow this method should not be called by application code.