Packageorg.spicefactory.parsley.messaging.receiver
Classpublic class AbstractMethodReceiver
InheritanceAbstractMethodReceiver Inheritance AbstractObjectProviderReceiver Inheritance AbstractMessageReceiver Inheritance Object
Implements MethodReceiver
Subclasses DefaultCommandObserver, DefaultMessageErrorHandler, DefaultMessageHandler

Abstract base class for all message handlers where the message is handled by a method invocation on the target instance.



Public Properties
 PropertyDefined By
 Inheritedorder : int
[read-only] The execution order for this receiver.
AbstractMessageReceiver
 Inheritedprovider : ObjectProvider
[read-only] The provider for the actual instance handling the message.
AbstractObjectProviderReceiver
 Inheritedselector : *
[read-only] An optional selector value to be used for selecting matching messages.
AbstractMessageReceiver
  targetMethod : Method
[read-only] The method to invoke for matching messages.
AbstractMethodReceiver
 Inheritedtype : Class
[read-only] The class or interface of the message.
AbstractMessageReceiver
Protected Properties
 PropertyDefined By
 Inheritedinfo : MessageReceiverInfo
[read-only] The receiver configuration in one (mutable) model object.
AbstractMessageReceiver
Public Methods
 MethodDefined By
  
Creates a new instance.
AbstractMethodReceiver
  
init(provider:ObjectProvider, method:Method):void
Initializes this receiver, passing the target object provider and method.
AbstractMethodReceiver
  
toString():String
AbstractMethodReceiver
Protected Methods
 MethodDefined By
  
deduceMessageTypeFromParameter(method:Method, paramIndex:uint):void
Returns the Class to use as the message type.
AbstractMethodReceiver
 Inherited
Sets the provider for target instances for this receiver.
AbstractObjectProviderReceiver
Property Detail
targetMethodproperty
targetMethod:Method  [read-only]

The method to invoke for matching messages.


Implementation
    public function get targetMethod():Method
Constructor Detail
AbstractMethodReceiver()Constructor
public function AbstractMethodReceiver(info:MessageReceiverInfo)

Creates a new instance.

Parameters
info:MessageReceiverInfo — the mapping information for this receiver
Method Detail
deduceMessageTypeFromParameter()method
protected function deduceMessageTypeFromParameter(method:Method, paramIndex:uint):void

Returns the Class to use as the message type. When the explicit type is set, this method will validate if it matches the target parameter of the method (subtypes are allowed). If omitted the message type will be solely determined by the parameter type.

Parameters

method:Method — the target method
 
paramIndex:uint — the index of the parameter that expects the dispatched message

init()method 
public function init(provider:ObjectProvider, method:Method):void

Initializes this receiver, passing the target object provider and method.

Parameters

provider:ObjectProvider — the provider to use for obtaining target instances for matching messages
 
method:Method — the target method on instances obtained by the provider that handles the message

toString()method 
public function toString():String

Returns
String