public class HeaderEnricher extends IntegrationObjectSupport implements Transformer, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
EXPRESSION_PARSER
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 |
---|---|
java.lang.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. |
org.springframework.messaging.Message<?> |
transform(org.springframework.messaging.Message<?> message) |
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
public HeaderEnricher()
public HeaderEnricher(java.util.Map<java.lang.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 java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public org.springframework.messaging.Message<?> transform(org.springframework.messaging.Message<?> message)
transform
in interface GenericTransformer<org.springframework.messaging.Message<?>,org.springframework.messaging.Message<?>>
transform
in interface Transformer
public void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
- Any exception.