public class MapMessageConverter extends Object implements MessageConverter, BeanFactoryAware
Constructor and Description |
---|
MapMessageConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
fromMessage(Message<?> message,
Class<?> clazz) |
protected MessageBuilderFactory |
getMessageBuilderFactory() |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setFilterHeadersInToMessage(boolean filterHeadersInToMessage)
By default all headers on Map passed to
toMessage(Object, MessageHeaders)
will be mapped. |
void |
setHeaderNames(String... headerNames)
Headers to be converted in
fromMessage(Message, Class) . |
Message<?> |
toMessage(Object object,
MessageHeaders messageHeaders) |
public final void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
protected MessageBuilderFactory getMessageBuilderFactory()
public void setHeaderNames(String... headerNames)
fromMessage(Message, Class)
.
toMessage(Object, MessageHeaders)
will populate all headers found in
the map, unless filterHeadersInToMessage
is true.headerNames
- The header names.public void setFilterHeadersInToMessage(boolean filterHeadersInToMessage)
toMessage(Object, MessageHeaders)
will be mapped. Set this property
to 'true' if you wish to limit the inbound headers to those in
the #headerNames.filterHeadersInToMessage
- true if the headers should be filtered.@Nullable public Message<?> toMessage(Object object, @Nullable MessageHeaders messageHeaders)
toMessage
in interface MessageConverter
@Nullable public Object fromMessage(Message<?> message, Class<?> clazz)
fromMessage
in interface MessageConverter