public class HeaderEnricher extends java.lang.Object implements Transformer, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
HeaderEnricher() |
HeaderEnricher(java.util.Map<java.lang.String,? extends HeaderValueMessageProcessor<?>> headersToAdd)
Create a HeaderEnricher with the given map of headers.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
setBeanName(java.lang.String beanName) |
void |
setDefaultOverwrite(boolean defaultOverwrite) |
<T> void |
setMessageProcessor(MessageProcessor<T> messageProcessor) |
void |
setShouldSkipNulls(boolean shouldSkipNulls)
Specify whether
null values, such as might be returned from
an expression evaluation, should be skipped. |
Message<?> |
transform(Message<?> message) |
public HeaderEnricher()
public HeaderEnricher(java.util.Map<java.lang.String,? extends HeaderValueMessageProcessor<?>> headersToAdd)
public <T> void setMessageProcessor(MessageProcessor<T> messageProcessor)
public void setDefaultOverwrite(boolean defaultOverwrite)
public void setShouldSkipNulls(boolean shouldSkipNulls)
null
values, such as might be returned from
an expression evaluation, should be skipped. The default value is
true
. Set this to false
if a
null
value should trigger removal of the
corresponding header instead.public Message<?> transform(Message<?> message)
transform
in interface Transformer
public void setBeanName(java.lang.String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception