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