此内容没有您所选择的语言版本。

16.3. Custom Context Mapper Properties


  • Your mapFrom() method needs to map a source native message's properties to the SwitchYard Message's Context.
  • Your 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:
  • The setIncludes(), setExcludes(), setIncludeNamespaces() and 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.
Also for RegexContextMapper, the following additional attributes of the <contextMapper/> element are used:
includes
This indicates which context property names to include.
excludes
This indicates which context property names to exclude.
includeNamespaces
This indicates which context property namespaces to include (if the property name is a qualified name).
excludeNamespaces
This indicates which context property namespaces to exclude (if the property name is a qualified name).
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.