Packageorg.spicefactory.parsley.core.command
Interfacepublic interface ObservableCommand

Represents a single command and holds all the information needed for command observers to process this command and its result.



Public Properties
 PropertyDefined By
  command : Object
[read-only] The actual command instance.
ObservableCommand
  id : String
[read-only] The id the command is registered with in the Context.
ObservableCommand
  result : Object
[read-only] The result produced by the command.
ObservableCommand
  root : Boolean
[read-only] Indicates whether this command is a root command or a nested command.
ObservableCommand
  status : CommandStatus
[read-only] The status of the command.
ObservableCommand
  trigger : Message
[read-only] The message that triggered the command.
ObservableCommand
  type : ClassInfo
[read-only] The type of the command.
ObservableCommand
Public Methods
 MethodDefined By
  
observe(callback:Function):void
Observes the completion of this command, no matter whether it successfully completes, aborts with an error or gets cancelled.
ObservableCommand
Property Detail
commandproperty
command:Object  [read-only]

The actual command instance.


Implementation
    public function get command():Object
idproperty 
id:String  [read-only]

The id the command is registered with in the Context.


Implementation
    public function get id():String
resultproperty 
result:Object  [read-only]

The result produced by the command.


Implementation
    public function get result():Object
rootproperty 
root:Boolean  [read-only]

Indicates whether this command is a root command or a nested command. This property is true if the command is a simple standalone command or the root command of a sequence or flow. It is flow if it is a command nested in a sequence or flow.


Implementation
    public function get root():Boolean
statusproperty 
status:CommandStatus  [read-only]

The status of the command.


Implementation
    public function get status():CommandStatus
triggerproperty 
trigger:Message  [read-only]

The message that triggered the command. This property is null when the command was started programmatically.


Implementation
    public function get trigger():Message
typeproperty 
type:ClassInfo  [read-only]

The type of the command.


Implementation
    public function get type():ClassInfo
Method Detail
observe()method
public function observe(callback:Function):void

Observes the completion of this command, no matter whether it successfully completes, aborts with an error or gets cancelled. The callback function must accept an argument of type ObservableCommand.

Parameters

callback:Function — the callback to invoke when the command completes