Packageorg.spicefactory.parsley.core.command.impl
Classpublic class DefaultCommandObserverProcessor
InheritanceDefaultCommandObserverProcessor Inheritance DefaultMessageProcessor Inheritance Object
Implements CommandObserverProcessor

Default implementation of the CommandObserverProcessor interface.



Public Properties
 PropertyDefined By
  command : Object
[read-only] The actual command instance.
DefaultCommandObserverProcessor
  commandStatus : CommandStatus
[read-only] The status of the command.
DefaultCommandObserverProcessor
 Inheritedmessage : Message
[read-only] The message instance.
DefaultMessageProcessor
  result : Object
[read-only] The result produced by the command.
DefaultCommandObserverProcessor
  root : Boolean
[read-only] Indicates whether this processor handles a root command or a nested command.
DefaultCommandObserverProcessor
 Inheritedstate : MessageState
[read-only] The current state of this processor.
DefaultMessageProcessor
Protected Properties
 PropertyDefined By
 Inheritedcache : MessageReceiverCache
[read-only] The receiver cache for the message type this processor handles
DefaultMessageProcessor
Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultCommandObserverProcessor
 Inherited
cancel():void
Cancels processing of this message.
DefaultMessageProcessor
  
changeResult(result:Object, error:Boolean = false):void
Changes the result that the command produced.
DefaultCommandObserverProcessor
 Inherited
proceed():void
DefaultMessageProcessor
 Inherited
resume():void
Resumes with message processing, invoking the next receiver.
DefaultMessageProcessor
 Inherited
rewind():void
Rewinds the processor so it will start with the first interceptor or handler again the next time the proceed method gets invoked.
DefaultMessageProcessor
 Inherited
sendResponse(msg:Object, selector:* = null):void
Sends the response to the Context the message originated from.
DefaultMessageProcessor
 Inherited
suspend():void
Suspends processing of the message.
DefaultMessageProcessor
Protected Methods
 MethodDefined By
 Inherited
Fetches the receivers for the message type and receiver kind this processor handles.
DefaultMessageProcessor
 Inherited
getLogString(action:String, receiverCount:int):String
Return a string that can be used to describe the message handled by this processor.
DefaultMessageProcessor
Property Detail
commandproperty
command:Object  [read-only]

The actual command instance.


Implementation
    public function get command():Object
commandStatusproperty 
commandStatus:CommandStatus  [read-only]

The status of the command.


Implementation
    public function get commandStatus():CommandStatus
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 processor handles 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
Constructor Detail
DefaultCommandObserverProcessor()Constructor
public function DefaultCommandObserverProcessor(observable:ObservableCommand, typeCache:MessageReceiverCache, triggerCache:MessageReceiverCache, settings:MessageSettings)

Creates a new instance.

Parameters
observable:ObservableCommand — the command to handle observers for
 
typeCache:MessageReceiverCache — the receiver selection cache corresponding to the command type
 
triggerCache:MessageReceiverCache — the receiver selection cache corresponding to the type of the trigger message
 
settings:MessageSettings — the settings for this processor
Method Detail
changeResult()method
public function changeResult(result:Object, error:Boolean = false):void

Changes the result that the command produced. Subsequent command observers (if any) will receive the new result. Observers that had already been processed will not get invoked a second time.

Parameters

result:Object — the new result to pass to subsequent command observers
 
error:Boolean (default = false) — true if the result represents an error