| Package | org.spicefactory.parsley.processor.messaging.receiver |
| Class | public class DefaultCommandObserver |
| Inheritance | DefaultCommandObserver AbstractMethodReceiver AbstractObjectProviderReceiver AbstractMessageReceiver Object |
| Implements | CommandObserver |
| Property | Defined By | ||
|---|---|---|---|
![]() | messageType : Class [read-only]
The class or interface of the message. | AbstractMessageReceiver | |
![]() | order : int [read-only]
The execution order for this receiver. | AbstractMessageReceiver | |
![]() | provider : ObjectProvider [read-only]
The provider for the actual instance handling the message. | AbstractObjectProviderReceiver | |
![]() | selector : * [read-only]
An optional selector value to be used for selecting matching messages. | AbstractMessageReceiver | |
| status : CommandStatus [read-only]
The status this observer is interested in. | DefaultCommandObserver | ||
![]() | targetMethod : Method [read-only]
The method to invoke for matching messages. | AbstractMethodReceiver | |
| Method | Defined By | ||
|---|---|---|---|
DefaultCommandObserver(provider:ObjectProvider, methodName:String, status:CommandStatus, selector:*, messageType:ClassInfo = null, order:int, supportsResult:Boolean = true)
Creates a new instance. | DefaultCommandObserver | ||
newFactory(methodName:String, status:CommandStatus, selector:*, messageType:ClassInfo = null, order:int, supportsResult:Boolean = true):MessageReceiverFactory [static]
Creates a new factory that creates DefaultCommandObserver instances. | DefaultCommandObserver | ||
observeCommand(processor:CommandObserverProcessor):void
Invoked when a matching command starts or finishes its execution. | DefaultCommandObserver | ||
| status | property |
status:CommandStatus [read-only] The status this observer is interested in.
public function get status():CommandStatus| DefaultCommandObserver | () | Constructor |
public function DefaultCommandObserver(provider:ObjectProvider, methodName:String, status:CommandStatus, selector:*, messageType:ClassInfo = null, order:int, supportsResult:Boolean = true)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
| |
status:CommandStatus — the command status this object is interested in
| |
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
| |
order:int (default = NaN) — the execution order for this receiver
| |
supportsResult:Boolean (default = true) — whether a result parameter is supported in the handler method
|
| newFactory | () | method |
public static function newFactory(methodName:String, status:CommandStatus, selector:*, messageType:ClassInfo = null, order:int, supportsResult:Boolean = true):MessageReceiverFactory
Creates a new factory that creates DefaultCommandObserver 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
| |
status:CommandStatus — the command status this object is interested in
| |
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
| |
order:int (default = NaN) — the execution order for this receiver
| |
supportsResult:Boolean (default = true) — whether a result parameter is supported in the handler method
|
MessageReceiverFactory — a new factory that creates DefaultCommandObserver instance
|
| observeCommand | () | method |
public function observeCommand(processor:CommandObserverProcessor):voidInvoked when a matching command starts or finishes its execution. The specified processor may be used to control the processing of remaining observers, like canceling or suspending the processor.
Parameters
processor:CommandObserverProcessor — the processor for the command observer
|