362.5. velocity Context

Camel 将在 Velocity 上下文中提供交换信息(调整 映射)。Exchange 被传输为:

keyvalue

exchange

Exchange 本身。

exchange.properties

Exchange 属性。

标头

In 消息的标头。

camelContext

Camel 上下文实例。

request

In 消息。

in

In 消息。

正文(body)

In message body。

out

Out 消息(仅适用于 InOut 消息交换模式)。

response

Out 消息(仅适用于 InOut 消息交换模式)。

从 Camel-2.14 开始,您可以通过设置消息标题 *CamelVelocityContext *just like

   VelocityContext velocityContext = new VelocityContext(variableMap);
   exchange.getIn().setHeader("CamelVelocityContext", velocityContext);