Packageorg.spicefactory.parsley.core.messaging
Interfacepublic interface MessageRouter
Implementors DefaultMessageRouter

The central message routing facility.



Public Methods
 MethodDefined By
  
Dispatches the specified message, processing all interceptors, handlers and bindings that have registered for that message type.
MessageRouter
  
observeCommand(command:Command, cache:MessageReceiverCache, status:CommandStatus = null):void
Observes the specified command and dispatches messages to registered observers when the state of the command changes.
MessageRouter
Method Detail
dispatchMessage()method
public function dispatchMessage(message:Message, cache:MessageReceiverCache):void

Dispatches the specified message, processing all interceptors, handlers and bindings that have registered for that message type.

Parameters

message:Message — the message to dispatch
 
cache:MessageReceiverCache — the cache of receivers for the message type

observeCommand()method 
public function observeCommand(command:Command, cache:MessageReceiverCache, status:CommandStatus = null):void

Observes the specified command and dispatches messages to registered observers when the state of the command changes.

Parameters

command:Command — the command to observe
 
cache:MessageReceiverCache — the cache of observers for the message type that triggered the command
 
status:CommandStatus (default = null) — the status of the command in case it differs from the status property of the command