org.springframework.integration.message
Class GenericMessage<T>
java.lang.Object
org.springframework.integration.message.GenericMessage<T>
- All Implemented Interfaces:
- Serializable, Message<T>
- Direct Known Subclasses:
- ErrorMessage
public class GenericMessage<T>
- extends Object
- implements Message<T>, Serializable
Base Message class defining common properties such as id, payload, and headers.
- Author:
- Mark Fisher
- See Also:
- Serialized Form
GenericMessage
public GenericMessage(T payload)
- Create a new message with the given payload.
- Parameters:
payload
- the message payload
GenericMessage
public GenericMessage(T payload,
Map<String,Object> headers)
- Create a new message with the given payload. The provided map
will be used to populate the message headers
- Parameters:
payload
- the message payloadheaders
- message headers- See Also:
MessageHeaders
getHeaders
public MessageHeaders getHeaders()
- Specified by:
getHeaders
in interface Message<T>
getPayload
public T getPayload()
- Specified by:
getPayload
in interface Message<T>
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2010. All Rights Reserved.