MessageExchange represents a container for normalized messages which are
described by an exchange pattern. The exchange pattern defines the
names, sequence, and cardinality of messages in an exchange.
author: JSR208 Expert Group
Creates a normalized message based on the specified message reference.
The pattern governing this exchange must contain a definition for the
reference name supplied.
a new normalized message throws: MessagingException - failed to create message
Retrieves the fault message for this exchange, if one exists. A
fault/message reference is unnecessary, since an exchange can carry
at most one fault, and it is always the final message in an exchange.
fault associated with the exchange, or null if not present
Retrieves a normalized message based on the specified message reference.
Parameters: name - message reference message with the specified reference name
Used to specify the source of a failure status. Invoking this method
automatically adjusts the status of the ME to ExchangeStatus.ERROR.
Parameters: error - error cause
Specifies the fault message for this exchange, if one exists. A
fault/message reference is unnecessary, since an exchange can carry
at most one fault, and it is always the final message in an exchange.
Parameters: fault - fault throws: MessagingException - operation not permitted in the current exchange state
Sets a normalized message with the specified message reference.
The pattern governing this exchange must contain a definition for the
reference name supplied.
Parameters: msg - normalized message Parameters: name - message reference throws: MessagingException - operation not permitted in the current exchange state
Sets the processing status of the exchange.
Parameters: status - exchange status throws: MessagingException - failed to set status, possibly due to an invalid state transition.