Package | org.spicefactory.lib.command.base |
Class | public class AbstractCancellableCommand |
Inheritance | AbstractCancellableCommand AbstractAsyncCommand flash.events.EventDispatcher |
Implements | CancellableCommand |
Subclasses | AbstractSuspendableCommand, DelayCommand |
A subclass of AbstractCancellableCommand 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).
It is also expected to override the doCancel
method to cancel the actual operation
Method | Defined By | ||
---|---|---|---|
AbstractCancellableCommand(description:String = null)
Creates a new instance. | AbstractCancellableCommand | ||
cancel():void
Cancels the command. | AbstractCancellableCommand | ||
execute():void
Starts the execution of this command. | AbstractAsyncCommand |
Method | Defined By | ||
---|---|---|---|
complete(result:Object = null):void
Signals that this command has completed. | AbstractAsyncCommand | ||
doCancel():void
Invoked when this command gets cancelled. | AbstractCancellableCommand | ||
doExecute():void
Invoked when the command starts executing. | AbstractAsyncCommand | ||
error(cause:Object = null):void
Signals an error condition and cancels the command. | AbstractAsyncCommand |
AbstractCancellableCommand | () | Constructor |
public function AbstractCancellableCommand(description:String = null)
Creates a new instance.
Parametersdescription:String (default = null ) — a description of this command
|
cancel | () | method |
public function cancel():void
Cancels the command.
doCancel | () | method |
protected function doCancel():void
Invoked when this command gets cancelled. Subclasses should override this method and cancel the actual operation this command performs.