public class HeaderEnricher extends IntegrationObjectSupport implements Transformer, IntegrationPattern
EXPRESSION_PARSER, logger
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.
|
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
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, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
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 IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
getIntegrationPatternType
in interface IntegrationPattern
IntegrationPatternType
this component implements.public void onInit()
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
public Message<?> transform(Message<?> message)
transform
in interface GenericTransformer<Message<?>,Message<?>>
transform
in interface Transformer