Packageorg.spicefactory.parsley.processor.messaging.receiver
Classpublic class DynamicCommandProxy
InheritanceDynamicCommandProxy Inheritance AbstractMessageReceiver Inheritance Object
Implements MessageTarget

A dynamic command is a special type of object that only gets created when a matching message was dispatched. It can contain "private" result and error handlers that will only be called for the result of the asynchronous command executed by the same instance. If the stateful property is false (the default) a new instance will be created for each matching message.



Public Properties
 PropertyDefined By
 InheritedmessageType : Class
[read-only] The class or interface of the message.
AbstractMessageReceiver
 Inheritedorder : int
[read-only] The execution order for this receiver.
AbstractMessageReceiver
  returnType : Class
[read-only]
DynamicCommandProxy
 Inheritedselector : *
[read-only] An optional selector value to be used for selecting matching messages.
AbstractMessageReceiver
Public Methods
 MethodDefined By
  
DynamicCommandProxy(messageInfo:ClassInfo, selector:*, order:int, context:Context, definition:DynamicObjectDefinition, stateful:Boolean, returnType:Class, execute:String, result:String = null, error:String = null, messageProperties:Array = null)
Creates a new instance.
DynamicCommandProxy
  
Handles a message for this target.
DynamicCommandProxy
Property Detail
returnTypeproperty
returnType:Class  [read-only]


Implementation
    public function get returnType():Class
Constructor Detail
DynamicCommandProxy()Constructor
public function DynamicCommandProxy(messageInfo:ClassInfo, selector:*, order:int, context:Context, definition:DynamicObjectDefinition, stateful:Boolean, returnType:Class, execute:String, result:String = null, error:String = null, messageProperties:Array = null)

Creates a new instance.

Parameters
messageInfo:ClassInfo — the type of the message which should trigger command execution
 
selector:* — the selector value to be used for selecting matching message targets
 
order:int — the execution order for this receiver
 
context:Context — the dynamic Context to use for creating new target instances
 
definition:DynamicObjectDefinition — the object definition to create new instances from
 
stateful:Boolean — whether the target command should keep state between command executions
 
returnType:Class — the return type of the method that executes the command
 
execute:String — the name of the method that executes the command
 
result:String (default = null) — the (optional) name of the method to invoke for the result
 
error:String (default = null) — the (optional) name of the method to invoke in case of errors.
 
messageProperties:Array (default = null) — the list of names of properties of the message that should be used as method parameters
Method Detail
handleMessage()method
public function handleMessage(processor:MessageProcessor):void

Handles a message for this target. The specified processor may be used to control the message processing, like canceling or suspending a message.

Parameters

processor:MessageProcessor — the processor for the message