public class GenericMessage<T> extends java.lang.Object implements Message<T>, java.io.Serializable
Constructor and Description |
---|
GenericMessage(T payload)
Create a new message with the given payload.
|
GenericMessage(T payload,
java.util.Map<java.lang.String,java.lang.Object> headers)
Create a new message with the given payload.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
MessageHeaders |
getHeaders() |
T |
getPayload() |
int |
hashCode() |
java.lang.String |
toString() |
public GenericMessage(T payload)
payload
- the message payloadpublic GenericMessage(T payload, java.util.Map<java.lang.String,java.lang.Object> headers)
payload
- the message payloadheaders
- message headersMessageHeaders
public MessageHeaders getHeaders()
getHeaders
in interface Message<T>
public T getPayload()
getPayload
in interface Message<T>
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object