public interface AttachmentMessage
extends org.apache.camel.Message
Message
for Java Attachment Support (with javax.activation).Modifier and Type | Method and Description |
---|---|
void |
addAttachment(String id,
DataHandler content)
Adds an attachment to the message using the id
|
void |
addAttachmentObject(String id,
Attachment content)
Adds an attachment to the message using the id
|
DataHandler |
getAttachment(String id)
Returns the attachment specified by the id
|
Set<String> |
getAttachmentNames()
Returns a set of attachment names of the message
|
Attachment |
getAttachmentObject(String id)
Returns the attachment specified by the id
|
Map<String,Attachment> |
getAttachmentObjects()
Returns all attachments of the message
|
Map<String,DataHandler> |
getAttachments()
Returns all attachments of the message
|
boolean |
hasAttachments()
Returns whether this message has attachments.
|
void |
removeAttachment(String id)
Removes the attachment specified by the id
|
void |
setAttachmentObjects(Map<String,Attachment> attachments)
Set all the attachments associated with this message
|
void |
setAttachments(Map<String,DataHandler> attachments)
Set all the attachments associated with this message
|
copy, copyFrom, copyFromWithNewBody, getBody, getBody, getExchange, getHeader, getHeader, getHeader, getHeader, getHeader, getHeader, getHeaders, getMandatoryBody, getMandatoryBody, getMessageId, hasHeaders, removeHeader, removeHeaders, removeHeaders, setBody, setBody, setHeader, setHeaders, setMessageId
DataHandler getAttachment(String id)
id
- the id under which the attachment is storedAttachment getAttachmentObject(String id)
id
- the id under which the attachment is storedSet<String> getAttachmentNames()
void removeAttachment(String id)
id
- the id of the attachment to removevoid addAttachment(String id, DataHandler content)
id
- the id to store the attachment undercontent
- the data handler for the attachmentvoid addAttachmentObject(String id, Attachment content)
id
- the id to store the attachment undercontent
- the attachmentMap<String,DataHandler> getAttachments()
Map<String,Attachment> getAttachmentObjects()
void setAttachments(Map<String,DataHandler> attachments)
attachments
- the attachmentsvoid setAttachmentObjects(Map<String,Attachment> attachments)
attachments
- the attachmentsboolean hasAttachments()
Apache Camel