org.springframework.integration.transformer
Class HeaderEnricher
java.lang.Object
org.springframework.integration.transformer.AbstractHeaderTransformer
org.springframework.integration.transformer.HeaderEnricher
- All Implemented Interfaces:
- Transformer
public class HeaderEnricher
- extends AbstractHeaderTransformer
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
Constructor Summary |
HeaderEnricher(java.util.Map<java.lang.String,java.lang.Object> headersToAdd)
Create a HeaderEnricher with the given map of headers. |
Method Summary |
void |
setOverwrite(boolean overwrite)
|
protected void |
transformHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeaderEnricher
public HeaderEnricher(java.util.Map<java.lang.String,java.lang.Object> headersToAdd)
- Create a HeaderEnricher with the given map of headers.
setOverwrite
public void setOverwrite(boolean overwrite)
transformHeaders
protected final void transformHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
- Specified by:
transformHeaders
in class AbstractHeaderTransformer