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

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

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

Message.hasAttachments介绍

暂无

代码示例

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

private MimeMultipart createMixedMultipartAttachments(MailConfiguration configuration, Exchange exchange)
  throws MessagingException, IOException {
  // fill the body with text
  MimeMultipart multipart = new MimeMultipart();
  multipart.setSubType("mixed");
  addBodyToMultipart(configuration, multipart, exchange);
  String partDisposition = configuration.isUseInlineAttachments() ? Part.INLINE : Part.ATTACHMENT;
  AttachmentsContentTransferEncodingResolver contentTransferEncodingResolver = configuration.getAttachmentsContentTransferEncodingResolver();
  if (exchange.getIn().hasAttachments()) {
    addAttachmentsToMultipart(multipart, partDisposition, contentTransferEncodingResolver, exchange);
  }
  return multipart;
}

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

if (!exchange.getIn().hasAttachments()) {
  addBodyToMultipart(configuration, multipartAlternative, exchange);
} else {

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

@Override
public void marshal(Exchange exchange, Object graph, OutputStream stream)
    throws NoTypeConversionAvailableException, MessagingException, IOException {
  if (multipartWithoutAttachment || headersInline || exchange.getIn().hasAttachments()) {
    ContentType contentType = getContentType(exchange);

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

if (that.hasAttachments()) {
  getAttachmentObjects().putAll(that.getAttachmentObjects());

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

createMultipartAlternativeMessage(mimeMessage, endpoint.getConfiguration(), exchange);
} else {
  if (exchange.getIn().hasAttachments()) {
    appendAttachmentsFromCamel(mimeMessage, endpoint.getConfiguration(), exchange);
  } else {

相关文章