org.apache.camel.Message.addAttachmentObject()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(170)

本文整理了Java中org.apache.camel.Message.addAttachmentObject()方法的一些代码示例,展示了Message.addAttachmentObject()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.addAttachmentObject()方法的具体详情如下:
包路径:org.apache.camel.Message
类名称:Message
方法名:addAttachmentObject

Message.addAttachmentObject介绍

暂无

代码示例

代码示例来源:origin: org.apache.camel/camel-cxf

camelExchange.getOut().addAttachmentObject(attachment.getId(), createCamelAttachment(attachment));

代码示例来源:origin: org.apache.camel/camel-cxf

&& !camelExchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY, DataFormat.class).equals(DataFormat.POJO)) {
for (Attachment attachment : cxfMessage.getAttachments()) {
  camelExchange.getIn().addAttachmentObject(attachment.getId(), createCamelAttachment(attachment));

代码示例来源:origin: org.apache.camel/camel-cxf

private void transferBinaryMultipartParameter(Object toMap, String parameterName, String multipartType, Message in) {
  org.apache.camel.Attachment dh = null;
  if (toMap instanceof Attachment) {
    dh = createCamelAttachment((Attachment) toMap);
  } else if (toMap instanceof DataSource) {
    dh = new DefaultAttachment((DataSource) toMap);
  } else if (toMap instanceof DataHandler) {
    dh = new DefaultAttachment((DataHandler) toMap);
  } else if (toMap instanceof InputStream) {
    dh = new DefaultAttachment(new InputStreamDataSource((InputStream) toMap, multipartType == null ? "application/octet-stream" : multipartType));
  }
  if (dh != null) {
    in.addAttachmentObject(parameterName, dh);
  }
}

代码示例来源:origin: org.apache.camel/camel-mail

camelAttachment.addHeader(header.getName(), header.getValue());
camelMessage.addAttachmentObject(getAttachmentKey(bp), camelAttachment);

代码示例来源:origin: org.apache.camel/camel-undertow

if (value.isFile()) {
  DefaultAttachment attachment = new DefaultAttachment(new FilePartDataSource(value));
  result.addAttachmentObject(key, attachment);
  body.put(key, attachment.getDataHandler());
} else if (headerFilterStrategy != null

相关文章