-
Notifications
You must be signed in to change notification settings - Fork 1
Message_Validator
The Message Validation in µ² serves the validation of messages before sending to another target agent.
Implementation
For implementation simply implement the MicroMessageValidator interface. It enforces the implementation of the validate() method which processes the MicroMessage and returns a boolean result indicating the validity of the message. Additionally the validate() method needs to react on the strength of validation. If the strictValidation variable (see MicroMessage) is set to true, the validator needs to implement the system reaction (e.g. RuntimeException).
An example for a validator which merely checks on the existence of the message field "TestedKey" is shown below.

The provided implementation is the DefaultMessageValidator which checks messages on the existence on sender field along with either recipient, intent or event field.
Configuration
The activation of message filtering is described in the context of the MicroMessage documentation.
The message validator implementation used for validation is specified in the Platform Configuration as fully qualified Java class name.