本文整理汇总了Java中org.apache.camel.util.ExchangeHelper.getBinding方法的典型用法代码示例。如果您正苦于以下问题:Java ExchangeHelper.getBinding方法的具体用法?Java ExchangeHelper.getBinding怎么用?Java ExchangeHelper.getBinding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.camel.util.ExchangeHelper
的用法示例。
在下文中一共展示了ExchangeHelper.getBinding方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBody
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected Object createBody() {
if (xmppPacket != null) {
XmppBinding binding = ExchangeHelper.getBinding(getExchange(), XmppBinding.class);
if (binding != null) {
return (getHeader(XmppConstants.DOC_HEADER) == null) ? binding.extractBodyFromXmpp(getExchange(), xmppPacket) : getHeader(XmppConstants.DOC_HEADER);
}
}
return null;
}
示例2: populateInitialHeaders
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected void populateInitialHeaders(Map<String, Object> map) {
if (xmppPacket != null) {
XmppBinding binding = ExchangeHelper.getBinding(getExchange(), XmppBinding.class);
if (binding != null) {
map.putAll(binding.extractHeadersFromXmpp(xmppPacket, getExchange()));
}
}
}
示例3: createBody
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected Object createBody() {
if (mailMessage != null) {
MailBinding binding = ExchangeHelper.getBinding(getExchange(), MailBinding.class);
return binding != null ? binding.extractBodyFromMail(getExchange(), this) : null;
}
return null;
}
示例4: populateInitialHeaders
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected void populateInitialHeaders(Map<String, Object> map) {
if (mailMessage != null) {
try {
MailBinding binding = ExchangeHelper.getBinding(getExchange(), MailBinding.class);
if (binding != null) {
map.putAll(binding.extractHeadersFromMail(mailMessage, getExchange()));
}
} catch (MessagingException e) {
throw new RuntimeCamelException("Error accessing headers due to: " + e.getMessage(), e);
}
}
}
示例5: populateInitialAttachments
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected void populateInitialAttachments(Map<String, DataHandler> map) {
if (mailMessage != null) {
try {
MailBinding binding = ExchangeHelper.getBinding(getExchange(), MailBinding.class);
if (binding != null) {
binding.extractAttachmentsFromMail(mailMessage, map);
}
} catch (Exception e) {
throw new RuntimeCamelException("Error populating the initial mail message attachments", e);
}
}
}
示例6: getBinding
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
public JmsBinding getBinding() {
if (binding == null) {
binding = ExchangeHelper.getBinding(getExchange(), JmsBinding.class);
}
return binding;
}
示例7: createBody
import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
@Override
protected Object createBody() {
Exchange exchange = getExchange();
IrcBinding binding = ExchangeHelper.getBinding(getExchange(), IrcBinding.class);
return binding != null ? binding.extractBodyFromIrc(exchange, this) : null;
}