当前位置: 首页>>代码示例>>Java>>正文


Java ExchangeHelper.getBinding方法代码示例

本文整理汇总了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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:XmppMessage.java

示例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()));
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:XmppMessage.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:9,代码来源:MailMessage.java

示例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);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:MailMessage.java

示例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);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:MailMessage.java

示例6: getBinding

import org.apache.camel.util.ExchangeHelper; //导入方法依赖的package包/类
public JmsBinding getBinding() {
    if (binding == null) {
        binding = ExchangeHelper.getBinding(getExchange(), JmsBinding.class);
    }
    return binding;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:JmsMessage.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:IrcMessage.java


注:本文中的org.apache.camel.util.ExchangeHelper.getBinding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。