Message Package provides an interface to manage the attributes of messages.
Function | Description |
---|---|
int getPropertyCount() |
Returns a count of the number of properties defined on this message |
Iterator<String> getPropertyNames() |
Returns an iterator over the defined property names. The returned iterator does not support Iterator.remove |
|
Returns an iterator over the properties defined on this message. The returned iterator is not modifiable. |
|
Returns true if a property with the given name is defined in the message. |
|
Returns true if a property with the given name is defined in the message. |
|
Returns the property value associated with the given property value. If no property with the specified value exists a new value is created. To avoid unnecessarily creating new properties, use |
|
Returns the property value associated with the given property value. If no property with the specified value exists a new value is created. To avoid unnecessarily creating new properties, use |
|
Removes the property with the given name. If there is no property with the specified name, this method has no effect. |
|
Returns this message's current body. If this message is newly created, this method will return null. |
|
Creates a new body for this message. If this method is called, the newly created body will replace any existing writable body. Exceptions:
|
|
Returns the character encoding that the message body was encoded with if it was not a binary stream. |
|
Sets the encoding that was used to transform the message body to a byte stream. If this method is not called, the system-wide default encoding will be assumed and returned by |
|
Sets the encoding that was used to transform the message body to a byte stream. If this method is not called, the system-wide default encoding will be assumed and returned by |
|
Adds an error to the message. This will cause the message to go to the error connector. The message will be persisted in its current state. |
|
Returns true if the message has errors associated with it. These may not be "new" errors. |
|
If the message is in the error state this method will return the reasons. |
|
Creates a copy of the current message. Message properties are duplicated as are message contexts and errors. The new message will point to the current message's existing and pending body. The returned message will have a unique message ID. Exceptions:
|