public interface Message
extends java.io.Serializable
// create a std dom parser
DOMParser parser = new DOMParser();
parser.parse(new InputSource(new StringReader(xml)));
Element element = parser.getDocument().getDocumentElement();
Map <String, Element> payload = new HashMap<String, Element>();
payload.put(<payload part name>, element);
Message<Element> xmlMessage =
XMLMessageFactory.getInstance().createMessage(payload);
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(Attachment attachment)
Adds a message attachment
|
void |
addHeader(org.w3c.dom.Element header)
Adds a protocol header to the message
|
java.util.List |
getAttachments()
Gets the message attachments
|
java.util.List |
getHeaders()
Gets the protocol headers
|
Payload |
getPayload()
Gets the message payload
|
java.util.Map |
getProperties()
Gets the message properties
|
java.lang.Object |
getProperty(java.lang.String name)
Gets the specified message property value
|
void |
setHeaders(java.util.List headers)
Replaces the current set of protocol headers with the specified set
|
void |
setPayload(Payload payload)
Specifies the payload associated with the message
|
void |
setProperties(java.util.Map properties)
Replaces all existing properties on the message with the specified set
|
void |
setProperty(java.lang.String name, java.lang.Object value)
Sets a specific property on the message
|
void addAttachment(Attachment attachment)
attachment - an attachmentvoid addHeader(org.w3c.dom.Element header)
header - the headerjava.util.List getAttachments()
java.util.List getHeaders()
Payload getPayload()
java.util.Map getProperties()
java.lang.Object getProperty(java.lang.String name)
name - the property namevoid setHeaders(java.util.List headers)
headers - the replacement headersvoid setPayload(Payload payload)
payload - the payload of the message.void setProperties(java.util.Map properties)
properties - the replacement properties
void setProperty(java.lang.String name,
java.lang.Object value)
name - the name of the propertyvalue - the value of the named property