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.
|
protected Message |
createMessage(Object object,
MessageProperties messageProperties,
Type genericType)
Crate a message from the payload object and message properties provided.
|
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.
|
Message |
toMessage(Object object,
MessageProperties messagePropertiesArg,
Type genericType)
Convert a Java object to a Message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromMessagepublic 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 failurepublic final Message toMessage(Object object, @Nullable MessageProperties messagePropertiesArg, @Nullable Type genericType) throws MessageConversionException
MessageConverterMessageConverter.toMessage(Object, MessageProperties).toMessage in interface MessageConverterobject - the object to convertmessagePropertiesArg - The message properties.genericType - the type to use to populate type headers.MessageConversionException - in case of conversion failureprotected Message createMessage(Object object, MessageProperties messageProperties, @Nullable Type genericType)
object - the payloadmessageProperties - the message properties (headers)genericType - the type to convert from - used to populate type headers.protected abstract Message createMessage(Object object, MessageProperties messageProperties)
object - the payload.messageProperties - the message properties (headers).