Package | org.spicefactory.parsley.context |
Class | public class MessageSettingsBuilder |
Inheritance | MessageSettingsBuilder Object |
Implements | org.spicefactory.parsley.context.SetupPart |
Method | Defined By | ||
---|---|---|---|
defaultReceiverScope(name:String):ContextBuilderSetup
Sets the default scope to use for message receivers and observers. | MessageSettingsBuilder | ||
globalErrorHandler(handler:Function):ContextBuilderSetup
Sets a handler that gets invoked for each Error thrown in any message receiver
in any Context in any scope. | MessageSettingsBuilder | ||
Sets the policy to apply for unhandled errors. | MessageSettingsBuilder |
defaultReceiverScope | () | method |
public function defaultReceiverScope(name:String):ContextBuilderSetup
Sets the default scope to use for message receivers and observers. If not specified the global scope will be used. In a modular application it is not uncommon that most message receivers are only interested in local messages. Switching the default allows to avoid specifying the local scope explicitly on all metadata tags.
Parameters
name:String — the name of the default receiver scope
|
ContextBuilderSetup — the original setup instance for method chaining
|
globalErrorHandler | () | method |
public function globalErrorHandler(handler:Function):ContextBuilderSetup
Sets a handler that gets invoked for each Error thrown in any message receiver
in any Context in any scope. The signature of the function must be:
function (processor:MessageProcessor, error:Error) : void
Parameters
handler:Function — the policy to apply for unhandled errors
|
ContextBuilderSetup — the original setup instance for method chaining
|
unhandledError | () | method |
public function unhandledError(policy:ErrorPolicy):ContextBuilderSetup
Sets the policy to apply for unhandled errors. An unhandled error
is an error thrown by a message handler where no matching error handler
was registered for. The default is ErrorPolicy.IGNORE
.
Parameters
policy:ErrorPolicy — the policy to apply for unhandled errors
|
ContextBuilderSetup — the original setup instance for method chaining
|