public abstract class AbstractMessageConverter extends Object implements MessageConverter
MessageConverter implementations.| Constructor and Description |
|---|
AbstractMessageConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Message |
createMessage(Object object,
MessageProperties messageProperties)
Crate a message from the payload object and message properties provided.
|
abstract Object |
fromMessage(Message message)
Convert from a Message to a Java object.
|
protected boolean |
isCreateMessageIds()
Flag to indicate that new messages should have unique identifiers added to their properties before sending.
|
void |
setCreateMessageIds(boolean createMessageIds)
Flag to indicate that new messages should have unique identifiers added to their properties before sending.
|
Message |
toMessage(Object object,
MessageProperties messageProperties)
Convert a Java object to a Message.
|
public void setCreateMessageIds(boolean createMessageIds)
createMessageIds - the flag value to setprotected boolean isCreateMessageIds()
public final Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException
MessageConvertertoMessage in interface MessageConverterobject - the object to convertmessageProperties - The message properties.MessageConversionException - in case of conversion failureprotected abstract Message createMessage(Object object, MessageProperties messageProperties)
object - the payloadmessageProperties - the message properties (headers)public abstract Object fromMessage(Message message) throws MessageConversionException
MessageConverterfromMessage in interface MessageConvertermessage - the message to convertMessageConversionException - in case of conversion failure