| Package | org.spicefactory.parsley.processor.messaging.receiver |
| Class | public class MessageHandler |
| Inheritance | MessageHandler AbstractMessageHandler AbstractMethodReceiver AbstractObjectProviderReceiver AbstractMessageReceiver Object |
| Implements | MessageTarget |
| Method | Defined By | ||
|---|---|---|---|
MessageHandler(provider:ObjectProvider, methodName:String, selector:*, messageType:ClassInfo = null, messageProperties:Array = null, order:int)
Creates a new instance. | MessageHandler | ||
handleMessage(processor:MessageProcessor):void
Handles a message for this target. | MessageHandler | ||
newFactory(methodName:String, selector:*, messageType:ClassInfo = null, messageProperties:Array = null, order:int):MessageReceiverFactory [static]
Creates a new factory that creates MessageHandler instances. | MessageHandler | ||
| MessageHandler | () | Constructor |
public function MessageHandler(provider:ObjectProvider, methodName:String, selector:*, messageType:ClassInfo = null, messageProperties:Array = null, order:int)Creates a new instance.
Parametersprovider:ObjectProvider — the provider for the instance that contains the target method
| |
methodName:String — the name of the target method that should be invoked
| |
selector:* (default = NaN) — an optional selector value to be used for selecting matching message targets
| |
messageType:ClassInfo (default = null) — the type of the message or null if it should be autodetected by the parameter of the target method
| |
messageProperties:Array (default = null) — the list of names of properties of the message that should be used as method parameters
| |
order:int (default = NaN) — the execution order for this receiver
|
| handleMessage | () | method |
public function handleMessage(processor:MessageProcessor):voidHandles 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
|
| newFactory | () | method |
public static function newFactory(methodName:String, selector:*, messageType:ClassInfo = null, messageProperties:Array = null, order:int):MessageReceiverFactory
Creates a new factory that creates MessageHandler instances.
Such a factory can be used for convenient registration of a MessageReceiverProcessorFactory
with a target ObjectDefinition.
Parameters
methodName:String — the name of the target method that should be invoked
| |
selector:* (default = NaN) — an optional selector value to be used for selecting matching message targets
| |
messageType:ClassInfo (default = null) — the type of the message or null if it should be autodetected by the parameter of the target method
| |
messageProperties:Array (default = null) — the list of names of properties of the message that should be used as method parameters
| |
order:int (default = NaN) — the execution order for this receiver
|
MessageReceiverFactory — a new factory that creates MessageHandler instance
|