public class GenericMessage<T> extends Object implements Message<T>, Serializable
MessageBuilder,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
GenericMessage(T payload)
Create a new message with the given payload.
|
protected |
GenericMessage(T payload,
Map<String,Object> headers)
Create a new message with the given payload.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
MessageHeaders |
getHeaders()
Returns message headers for the message (never
null). |
T |
getPayload()
Returns the message payload.
|
int |
hashCode() |
String |
toString() |
protected GenericMessage(T payload)
payload - the message payloadprotected GenericMessage(T payload, Map<String,Object> headers)
payload - the message payloadheaders - message headersMessageHeaderspublic MessageHeaders getHeaders()
Messagenull).getHeaders in interface Message<T>public T getPayload()
MessagegetPayload in interface Message<T>