public class EnricherSpec extends ConsumerEndpointSpec<EnricherSpec,ContentEnricher>
ConsumerEndpointSpec
extension for the ContentEnricher
.adviceChain
componentsToRegister, endpointFactoryBean, handler
logger, PARSER, target
Modifier and Type | Method and Description |
---|---|
protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,ContentEnricher> |
doGet() |
EnricherSpec |
errorChannel(org.springframework.messaging.MessageChannel errorChannel) |
EnricherSpec |
errorChannel(java.lang.String errorChannel) |
<V> EnricherSpec |
header(java.lang.String headerName,
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,
java.util.function.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,
java.util.function.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,
java.util.function.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(java.util.function.Function<org.springframework.messaging.Message<P>,?> requestPayloadFunction) |
EnricherSpec |
requestPayloadExpression(java.lang.String requestPayloadExpression) |
EnricherSpec |
requestSubFlow(IntegrationFlow subFlow)
The request sub-flow.
|
EnricherSpec |
requestTimeout(java.lang.Long requestTimeout) |
EnricherSpec |
shouldClonePayload(boolean shouldClonePayload) |
advice, async, autoStartup, notPropagatedHeaders, order, phase, poller, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
assertHandler, getComponentsToRegister, id, poller, poller
_this, get, getId, getObject, getObjectType, 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 errorChannel(org.springframework.messaging.MessageChannel errorChannel)
errorChannel
- the error channel.ContentEnricher.setErrorChannel(MessageChannel)
public EnricherSpec errorChannel(java.lang.String errorChannel)
errorChannel
- the name of the error channel bean.ContentEnricher.setErrorChannelName(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(java.util.function.Function<org.springframework.messaging.Message<P>,?> requestPayloadFunction)
P
- the payload type.requestPayloadFunction
- the requestPayloadFunction.ContentEnricher.setRequestPayloadExpression(Expression)
,
FunctionExpression
public EnricherSpec requestSubFlow(IntegrationFlow subFlow)
subFlow
- the subFlowDefinitionpublic 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, java.util.function.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, java.util.function.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, java.util.function.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 headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor)
HeaderValueMessageProcessor
.V
- the value type.headerName
- the header name.headerValueMessageProcessor
- the headerValueMessageProcessor.ContentEnricher.setHeaderExpressions(Map)
protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,ContentEnricher> doGet()
doGet
in class ConsumerEndpointSpec<EnricherSpec,ContentEnricher>