public class HeaderEnricher extends IntegrationObjectSupport implements Transformer, BeanNameAware, InitializingBean
Constructor and Description |
---|
HeaderEnricher() |
HeaderEnricher(Map<String,? extends HeaderValueMessageProcessor<?>> headersToAdd)
Create a HeaderEnricher with the given map of headers.
|
Modifier and Type | Method and Description |
---|---|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
void |
onInit()
Subclasses may implement this for initialization logic.
|
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) |
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setBeanName
afterPropertiesSet
public HeaderEnricher()
public HeaderEnricher(Map<String,? extends HeaderValueMessageProcessor<?>> headersToAdd)
headersToAdd
- The headers to add.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.shouldSkipNulls
- true when null values should be skipped.public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public Message<?> transform(Message<?> message)
transform
in interface GenericTransformer<Message<?>,Message<?>>
transform
in interface Transformer
public void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- Any exception.