Packageorg.spicefactory.lib.command.base
Classpublic class AbstractSuspendableCommand
InheritanceAbstractSuspendableCommand Inheritance AbstractCancellableCommand Inheritance AbstractAsyncCommand Inheritance flash.events.EventDispatcher
Implements SuspendableCommand
Subclasses AbstractCommandExecutor, LightCommandAdapter

Abstract base implementation of the CancellableCommand interface.

A subclass of AbstractCancellableCommand is expected to override the doStart, doCancel, doSuspend and doResume methods and perform the necessary operations, and then call complete when the operation is done (or error when the command fails to complete successfully).



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

Indicates whether this command is currently suspended.


Implementation
    public function get suspended():Boolean
Constructor Detail
AbstractSuspendableCommand()Constructor
public function AbstractSuspendableCommand(description:String = null)

Creates a new instance.

Parameters
description:String (default = null) — a description of this command
Method Detail
doResume()method
protected function doResume():void

Invoked when this command gets resumed. Subclasses should override this method and resume the suspended operation this command performs.

doSuspend()method 
protected function doSuspend():void

Invoked when this command gets suspended. Subclasses should override this method and suspend the actual operation this command performs.

resume()method 
public function resume():void

Resumes the command. Calling this method only has an effect if the command is currently suspended.

suspend()method 
public function suspend():void

Suspends the command. Calling this method only has an effect if the command is currently executing.