| Package | org.spicefactory.parsley.processor.messaging.receiver |
| Class | public class DefaultMessageErrorHandler |
| Inheritance | DefaultMessageErrorHandler AbstractMethodReceiver AbstractObjectProviderReceiver AbstractMessageReceiver Object |
| Implements | MessageErrorHandler |
| Property | Defined By | ||
|---|---|---|---|
| errorType : Class [read-only]
The type of Error this handler is interested in. | DefaultMessageErrorHandler | ||
![]() | 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 | |
![]() | targetMethod : Method [read-only]
The method to invoke for matching messages. | AbstractMethodReceiver | |
| Method | Defined By | ||
|---|---|---|---|
DefaultMessageErrorHandler(provider:ObjectProvider, methodName:String, messageType:Class, selector:*, errorType:ClassInfo = null, order:int)
Creates a new instance. | DefaultMessageErrorHandler | ||
handleError(processor:MessageProcessor, error:Error):void
Handles an error thrown by a regular message target or interceptor. | DefaultMessageErrorHandler | ||
newFactory(methodName:String, messageType:Class, selector:*, errorType:ClassInfo = null, order:int):MessageReceiverFactory [static]
Creates a new factory that creates MessageHandler instances. | DefaultMessageErrorHandler | ||
| errorType | property |
errorType:Class [read-only] The type of Error this handler is interested in. Like with matching message classes this works in a polymorphic way. Specifying the base Error class creates an ErrorHandler that handles all errors for a particular message type.
public function get errorType():Class| DefaultMessageErrorHandler | () | Constructor |
public function DefaultMessageErrorHandler(provider:ObjectProvider, methodName:String, messageType:Class, selector:*, errorType:ClassInfo = null, order:int)
Creates a new instance.
The target method must have a parameter of type org.spicefactory.parsley.messaging.MessageProcessor
and a second parameter of type Error (or a subtype).
provider:ObjectProvider — the provider for the actual instance handling the message
| |
methodName:String — the name of the method to invoke for matching messages
| |
messageType:Class — the type of the message this error handler is interested in
| |
selector:* (default = NaN) — an additional selector value to be used to determine matching messages
| |
errorType:ClassInfo (default = null) — the type of Error this handler is interested in
| |
order:int (default = NaN) — the execution order for this receiver
|
| handleError | () | method |
public function handleError(processor:MessageProcessor, error:Error):voidHandles an error thrown by a regular message target or interceptor. Processing further error handlers and targets will only happen if proceed is called on the specified processor.
Parameters
processor:MessageProcessor — the processor for the message
| |
error:Error — the error thrown by a message target
|
| newFactory | () | method |
public static function newFactory(methodName:String, messageType:Class, selector:*, errorType:ClassInfo = 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
| |
messageType:Class — an optional selector value to be used for selecting matching message targets
| |
selector:* (default = NaN) — the type of the message or null if it should be autodetected by the parameter of the target method
| |
errorType:ClassInfo (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
|