Red Hat Training
A Red Hat training course is available for Red Hat Fuse
16.3. Custom Context Mapper Properties
mapFrom()method needs to map a source native message's properties to the SwitchYard Message's Context.
mapTo()method needs to map a SwitchYard Message's Context properties into the target native message.
- If you extend
BaseContextMapper, these methods are canceled with "no-op" implementations so you only have to implement what you wish.
If you are adding regular expression, support, note the following:
setExcludeNamespaces()methods are just bean properties. The
matches()methods use those bean properties to determine if the specified name or qualified name passes the collective regular expressions.
- If you extend the
BaseRegexContextMapper, all of these are implemented for you. Then, in your implementation's mapFrom and mapTo methods, you only need to first check if the property matches before you map it.
RegexContextMapper, the following additional attributes of the <contextMapper/> element are used:
- This indicates which context property names to include.
- This indicates which context property names to exclude.
- This indicates which context property namespaces to include (if the property name is a qualified name).
- This indicates which context property namespaces to exclude (if the property name is a qualified name).