Message with a generic payload.
Once created, a GenericMessage is immutable.
MessageBuilder
| Modifier and Type | Field and Description |
|---|---|
| private final MessageHeaders | |
| private final T | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | GenericMessage(T
the message payload (never payload)null)Create a new message with the given payload. |
| public | GenericMessage(T
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 | GenericMessage(T
the message payload (never payload, MessageHeaders null)message headers headers)A constructor with the |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public MessageHeaders | getHeaders()
Implements org. null but may be empty).
|
| public T | getPayload()
Implements org. |
| public int | |
| public String |
| headers | back to summary |
|---|---|
| private final MessageHeaders headers | |
| payload | back to summary |
|---|---|
private final T payload
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| GenericMessage | back to summary |
|---|---|
| public GenericMessage(T payload) Create a new message with the given payload.
| |
| GenericMessage | back to summary |
|---|---|
| public GenericMessage(T payload, Map<String, Object> headers) Create a new message with the given payload and headers. The content of the given header map is copied. | |
| GenericMessage | back to summary |
|---|---|
| public GenericMessage(T payload, MessageHeaders headers) A constructor with the Note the given
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getHeaders | back to summary |
|---|---|
| public MessageHeaders getHeaders() Implements org. Doc from org. Return message headers for the message (never
| |
| getPayload | back to summary |
|---|---|
| public T getPayload() Implements org. Doc from org. Return the message payload.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |