Packageorg.spicefactory.parsley.core.command
Interfacepublic interface CommandObserverProcessor extends MessageProcessor
Implementors DefaultCommandObserverProcessor

Responsible for processing command observers. Will be passed to registered CommandObserver instances which may chose to cancel or suspend and later resume the message processing.



Public Properties
 PropertyDefined By
  command : Object
[read-only] The actual command instance.
CommandObserverProcessor
  commandStatus : CommandStatus
[read-only] The status of the command.
CommandObserverProcessor
 Inheritedmessage : Message
[read-only] The message instance.
MessageProcessor
  result : Object
[read-only] The result produced by the command.
CommandObserverProcessor
  root : Boolean
[read-only] Indicates whether this processor handles a root command or a nested command.
CommandObserverProcessor
 Inheritedstate : MessageState
[read-only] The current state of this processor.
MessageProcessor
Public Methods
 MethodDefined By
 Inherited
cancel():void
Cancels processing of this message.
MessageProcessor
  
changeResult(result:Object, error:Boolean = false):void
Changes the result that the command produced.
CommandObserverProcessor
 Inherited
resume():void
Resumes with message processing, invoking the next receiver.
MessageProcessor
 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.
MessageProcessor
 Inherited
sendResponse(msg:Object, selector:* = null):void
Sends the response to the Context the message originated from.
MessageProcessor
 Inherited
suspend():void
Suspends processing of the message.
MessageProcessor
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
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