Packageorg.spicefactory.lib.command.base
Classpublic class AbstractCancellableCommand
InheritanceAbstractCancellableCommand Inheritance AbstractAsyncCommand Inheritance flash.events.EventDispatcher
Implements CancellableCommand
Subclasses AbstractSuspendableCommand, DelayCommand

Abstract base implementation of the CancellableCommand interface.

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



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only] Indicates whether this command is currently executing.
AbstractAsyncCommand
Public Methods
 MethodDefined By
  
AbstractCancellableCommand(description:String = null)
Creates a new instance.
AbstractCancellableCommand
  
cancel():void
Cancels the command.
AbstractCancellableCommand
 Inherited
execute():void
Starts the execution of this command.
AbstractAsyncCommand
Protected Methods
 MethodDefined By
 Inherited
complete(result:Object = null):void
Signals that this command has completed.
AbstractAsyncCommand
  
doCancel():void
Invoked when this command gets cancelled.
AbstractCancellableCommand
 Inherited
doExecute():void
Invoked when the command starts executing.
AbstractAsyncCommand
 Inherited
error(cause:Object = null):void
Signals an error condition and cancels the command.
AbstractAsyncCommand
Constructor Detail
AbstractCancellableCommand()Constructor
public function AbstractCancellableCommand(description:String = null)

Creates a new instance.

Parameters
description:String (default = null) — a description of this command
Method Detail
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.