org.springframework.integration.transformer
Class HeaderEnricher
java.lang.Object
org.springframework.integration.transformer.HeaderEnricher
- All Implemented Interfaces:
- Transformer
- Direct Known Subclasses:
- XPathHeaderEnricher
public class HeaderEnricher
- extends Object
- implements Transformer
A Transformer that adds statically configured header values to a Message.
Accepts the boolean 'overwrite' property that specifies whether values
should be overwritten. By default, any existing header values for
a given key, will not be replaced.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeaderEnricher
public HeaderEnricher()
HeaderEnricher
public HeaderEnricher(Map<String,? extends HeaderEnricher.HeaderValueMessageProcessor<?>> headersToAdd)
- Create a HeaderEnricher with the given map of headers.
setMessageProcessor
public <T> void setMessageProcessor(MessageProcessor<T> messageProcessor)
setDefaultOverwrite
public void setDefaultOverwrite(boolean defaultOverwrite)
setShouldSkipNulls
public void setShouldSkipNulls(boolean shouldSkipNulls)
- Specify whether
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.
transform
public Message<?> transform(Message<?> message)
- Specified by:
transform
in interface Transformer
Copyright © 2010. All Rights Reserved.