public class EnricherSpec extends MessageHandlerSpec<EnricherSpec,org.springframework.integration.transformer.ContentEnricher>
MessageHandlerSpec
implementation for the ContentEnricher
.logger, PARSER, target
Modifier and Type | Method and Description |
---|---|
protected org.springframework.integration.transformer.ContentEnricher |
doGet() |
<V> EnricherSpec |
header(java.lang.String name,
org.springframework.integration.transformer.support.HeaderValueMessageProcessor<V> headerValueMessageProcessor)
Set a header value using an explicit
HeaderValueMessageProcessor . |
<V> EnricherSpec |
header(java.lang.String name,
V value)
Set a header with the value if it is not already present.
|
<V> EnricherSpec |
header(java.lang.String name,
V value,
java.lang.Boolean overwrite) |
EnricherSpec |
headerExpression(java.lang.String name,
java.lang.String expression)
Set a header with the expression evaluation if the header is not already present.
|
EnricherSpec |
headerExpression(java.lang.String name,
java.lang.String expression,
java.lang.Boolean overwrite) |
<P> EnricherSpec |
headerFunction(java.lang.String name,
Function<org.springframework.messaging.Message<P>,java.lang.Object> function)
Set a header with the function return value if the header is not already present.
|
<P> EnricherSpec |
headerFunction(java.lang.String name,
Function<org.springframework.messaging.Message<P>,java.lang.Object> function,
java.lang.Boolean overwrite) |
<V> EnricherSpec |
property(java.lang.String key,
V value) |
EnricherSpec |
propertyExpression(java.lang.String key,
java.lang.String expression) |
<P> EnricherSpec |
propertyFunction(java.lang.String key,
Function<org.springframework.messaging.Message<P>,java.lang.Object> function) |
EnricherSpec |
replyChannel(org.springframework.messaging.MessageChannel replyChannel) |
EnricherSpec |
replyChannel(java.lang.String replyChannel) |
EnricherSpec |
replyTimeout(java.lang.Long replyTimeout) |
EnricherSpec |
requestChannel(org.springframework.messaging.MessageChannel requestChannel) |
EnricherSpec |
requestChannel(java.lang.String requestChannel) |
<P> EnricherSpec |
requestPayload(Function<org.springframework.messaging.Message<P>,?> requestPayloadFunction) |
EnricherSpec |
requestPayloadExpression(java.lang.String requestPayloadExpression) |
EnricherSpec |
requestTimeout(java.lang.Long requestTimeout) |
EnricherSpec |
shouldClonePayload(boolean shouldClonePayload) |
_this, get, getId, getObject, getObjectType, id, isSingleton
public EnricherSpec requestChannel(org.springframework.messaging.MessageChannel requestChannel)
requestChannel
- the request channel.ContentEnricher.setRequestChannel(MessageChannel)
public EnricherSpec requestChannel(java.lang.String requestChannel)
requestChannel
- the request channel.ContentEnricher.setRequestChannelName(String)
public EnricherSpec replyChannel(org.springframework.messaging.MessageChannel replyChannel)
replyChannel
- the reply channel.ContentEnricher.setReplyChannel(MessageChannel)
public EnricherSpec replyChannel(java.lang.String replyChannel)
replyChannel
- the reply channel.ContentEnricher.setReplyChannelName(String)
public EnricherSpec requestTimeout(java.lang.Long requestTimeout)
requestTimeout
- the requestTimeoutContentEnricher.setRequestTimeout(Long)
public EnricherSpec replyTimeout(java.lang.Long replyTimeout)
replyTimeout
- the replyTimeoutContentEnricher.setReplyTimeout(Long)
public EnricherSpec requestPayloadExpression(java.lang.String requestPayloadExpression)
requestPayloadExpression
- the requestPayloadExpression.ContentEnricher.setRequestPayloadExpression(Expression)
public <P> EnricherSpec requestPayload(Function<org.springframework.messaging.Message<P>,?> requestPayloadFunction)
P
- the payload type.requestPayloadFunction
- the requestPayloadFunction.ContentEnricher.setRequestPayloadExpression(Expression)
,
FunctionExpression
public EnricherSpec shouldClonePayload(boolean shouldClonePayload)
shouldClonePayload
- the shouldClonePayload.ContentEnricher.setShouldClonePayload(boolean)
public <V> EnricherSpec property(java.lang.String key, V value)
V
- the value type.key
- the key.value
- the value.ContentEnricher.setPropertyExpressions(Map)
public EnricherSpec propertyExpression(java.lang.String key, java.lang.String expression)
key
- the key.expression
- the expression.ContentEnricher.setPropertyExpressions(Map)
public <P> EnricherSpec propertyFunction(java.lang.String key, Function<org.springframework.messaging.Message<P>,java.lang.Object> function)
P
- the payload type.key
- the key.function
- the function (usually a JDK8 lambda).ContentEnricher.setPropertyExpressions(Map)
,
FunctionExpression
public <V> EnricherSpec header(java.lang.String name, V value)
V
- the value type.name
- the header name.value
- the value.ContentEnricher.setHeaderExpressions(Map)
public <V> EnricherSpec header(java.lang.String name, V value, java.lang.Boolean overwrite)
V
- the value type.name
- the header name.value
- the value.overwrite
- true to overwrite the header if already present.ContentEnricher.setHeaderExpressions(Map)
public EnricherSpec headerExpression(java.lang.String name, java.lang.String expression)
name
- the header name.expression
- the expression to be evaluated against the reply message to obtain the value.ContentEnricher.setHeaderExpressions(Map)
public EnricherSpec headerExpression(java.lang.String name, java.lang.String expression, java.lang.Boolean overwrite)
name
- the header name.expression
- the expression to be evaluated against the reply message to obtain the value.overwrite
- true to overwrite the header if already present.ContentEnricher.setHeaderExpressions(Map)
public <P> EnricherSpec headerFunction(java.lang.String name, Function<org.springframework.messaging.Message<P>,java.lang.Object> function)
P
- the payload type.name
- the header name.function
- the function (usually a JDK8 lambda).ContentEnricher.setHeaderExpressions(Map)
,
FunctionExpression
public <P> EnricherSpec headerFunction(java.lang.String name, Function<org.springframework.messaging.Message<P>,java.lang.Object> function, java.lang.Boolean overwrite)
P
- the payload type.name
- the header name.function
- the function (usually a JDK8 lambda).overwrite
- true to overwrite the header if already present.ContentEnricher.setHeaderExpressions(Map)
,
FunctionExpression
public <V> EnricherSpec header(java.lang.String name, org.springframework.integration.transformer.support.HeaderValueMessageProcessor<V> headerValueMessageProcessor)
HeaderValueMessageProcessor
.V
- the value type.name
- the header name.headerValueMessageProcessor
- the headerValueMessageProcessor.ContentEnricher.setHeaderExpressions(Map)
protected org.springframework.integration.transformer.ContentEnricher doGet()
doGet
in class IntegrationComponentSpec<EnricherSpec,org.springframework.integration.transformer.ContentEnricher>