attachment factory feature

Attachment Factory Feature

Version: 17.07

Supported Since: 17.01

Attachment Factory Feature

Attachment Factory Feature can be used to create instances of Attachments when required. Attachment Factory Feature has five API methods. They will be described below.

APIs Java Docs

createAttachmentFromMessageContext

Parameters
XMessageContext messageContext

Message Context

Returns
XAttachment

Returns XAttachment with message payload, message content type and message headers of the given message context set to the attachment.

Gives an Attachment with message payload, message content type and message headers of the given message context set to the attachment.

Note that message payload and headers will be cloned before setting them to the attachment.

createAttachmentFromPayload

Parameters
XMessageFormat payload

Message payload

Returns

XAttachment::Gives an Attachment with payload set to the attachment.

Gives an Attachment with payload set to the attachment.

Note that the given payload will be directly assigned to the attachment and will not be cloned.

createAttachmentFromPayload

Parameters
XMessageFormat payload

Message payload

String contentType

Content Type of the payload

Returns
XAttachment

Gives an Attachment with message payload and content type set to the attachment.

Gives an Attachment with message payload and content type set to the attachment.

Note that the given payload will be directly assigned to the attachment and will not be cloned.

createAttachmentFromPayload

Parameters
T payload

the payload to be used for the attachment

Returns
XAttachment

Gives an Attachment with the given payload set to the attachment.

Gives an Attachment with the given payload set to the attachment. Note that an XMessageFormat payload will first be created using Payload Factory Feature and then only it will be set to the attachment.

createAttachmentFromPayload

Parameters
T payload

the payload to be used for the attachment

String contentType

Content Type of the payload

Returns
XAttachment

Gives an Attachment with the given payload and content type set to the attachment.

Gives an Attachment with the given payload and content type set to the attachment. Note that an XMessageFormat payload will first be created using Payload Factory Feature and then only it will be set to the attachment.

In this topic
In this topic
Contact Us