GenericMessage with a Throwable payload.
The payload is typically a org.
with the message at the point of failure in its failedMessage property.
An optional originalMessage may be provided, which represents the message
that existed at the point in the stack where the error message is created.
Consider some code that starts with a message, invokes some process that performs transformation on that message and then fails for some reason, throwing the exception. The exception is caught and an error message produced that contains both the original message, and the transformed message that failed.
MessageBuilder
| Modifier and Type | Field and Description |
|---|---|
| private final Message | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | ErrorMessage(Throwable
the message payload (never payload)null)Create a new message with the given payload. |
| public | ErrorMessage(Throwable
the message payload (never payload, Map<String, Object> null)message headers to use for initialization headers)Create a new message with the given payload and headers. |
| public | ErrorMessage(Throwable
the message payload (never payload, MessageHeaders null)message headers headers)A constructor with the |
| public | ErrorMessage(Throwable
the message payload (never payload, Message<?> null)the original message (if present) at the point
in the stack where the ErrorMessage was created originalMessage)Create a new message with the given payload and original message. |
| public | ErrorMessage(Throwable
the message payload (never payload, Map<String, Object> null)message headers to use for initialization headers, Message<?> the original message (if present) at the point
in the stack where the ErrorMessage was created originalMessage)Create a new message with the given payload, headers and original message. |
| public | ErrorMessage(Throwable
the message payload (never payload, MessageHeaders null)message headers headers, Message<?> the original message (if present) at the point
in the stack where the ErrorMessage was created originalMessage)Create a new message with the payload, |
| Modifier and Type | Method and Description |
|---|---|
| public Message | getOriginalMessage()
Return the original message (if available) at the point in the stack where the ErrorMessage was created. |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| originalMessage | back to summary |
|---|---|
private final Message<?> originalMessage
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload) Create a new message with the given payload.
| |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload, Map<String, Object> headers) Create a new message with the given payload and headers. The content of the given header map is copied. | |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload, MessageHeaders headers) A constructor with the Note the given
| |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload, Message<?> originalMessage) Create a new message with the given payload and original message. | |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload, Map<String, Object> headers, Message<?> originalMessage) Create a new message with the given payload, headers and original message. The content of the given header map is copied. | |
| ErrorMessage | back to summary |
|---|---|
| public ErrorMessage(Throwable payload, MessageHeaders headers, Message<?> originalMessage) Create a new message with the payload, Note the given
| |
| getOriginalMessage | back to summary |
|---|---|
| public Message Return the original message (if available) at the point in the stack where the ErrorMessage was created.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |