Class EnricherSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
org.springframework.integration.dsl.ConsumerEndpointSpec<EnricherSpec,ContentEnricher>
org.springframework.integration.dsl.EnricherSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,ContentEnricher>>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class EnricherSpec extends ConsumerEndpointSpec<EnricherSpec,ContentEnricher>
A
ConsumerEndpointSpec
extension for the ContentEnricher
.- Since:
- 5.0
- Author:
- Artem Bilan, Tim Ysewyn, Ian Bondoc, Alexis Hafner
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,HeaderValueMessageProcessor<?>>
headerExpressions
protected Map<String,Expression>
propertyExpressions
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnricherSpec()
-
Method Summary
Modifier and Type Method Description protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,ContentEnricher>
doGet()
EnricherSpec
errorChannel(String errorChannel)
EnricherSpec
errorChannel(MessageChannel errorChannel)
<V> EnricherSpec
header(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor)
Set a header value using an explicitHeaderValueMessageProcessor
.<V> EnricherSpec
header(String name, V value)
Set a header with the value if it is not already present.<V> EnricherSpec
header(String name, V value, Boolean overwrite)
EnricherSpec
headerExpression(String name, String expression)
Set a header with the expression evaluation if the header is not already present.EnricherSpec
headerExpression(String name, String expression, Boolean overwrite)
<P> EnricherSpec
headerFunction(String name, Function<Message<P>,Object> function)
Set a header with the function return value if the header is not already present.<P> EnricherSpec
headerFunction(String name, Function<Message<P>,Object> function, Boolean overwrite)
<V> EnricherSpec
property(String key, V value)
EnricherSpec
propertyExpression(String key, String expression)
<P> EnricherSpec
propertyFunction(String key, Function<Message<P>,Object> function)
EnricherSpec
replyChannel(String replyChannel)
EnricherSpec
replyChannel(MessageChannel replyChannel)
EnricherSpec
replyTimeout(Long replyTimeout)
EnricherSpec
requestChannel(String requestChannel)
EnricherSpec
requestChannel(MessageChannel requestChannel)
<P> EnricherSpec
requestPayload(Function<Message<P>,?> requestPayloadFunction)
EnricherSpec
requestPayloadExpression(String requestPayloadExpression)
EnricherSpec
requestSubFlow(IntegrationFlow subFlow)
The request sub-flow.EnricherSpec
requestTimeout(Long requestTimeout)
EnricherSpec
shouldClonePayload(boolean shouldClonePayload)
Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
EnricherSpec
protected EnricherSpec()
-
-
Method Details
-
requestChannel
- Parameters:
requestChannel
- the request channel.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setRequestChannel(MessageChannel)
-
requestChannel
- Parameters:
requestChannel
- the request channel.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setRequestChannelName(String)
-
replyChannel
- Parameters:
replyChannel
- the reply channel.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setReplyChannel(MessageChannel)
-
replyChannel
- Parameters:
replyChannel
- the reply channel.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setReplyChannelName(String)
-
errorChannel
- Parameters:
errorChannel
- the error channel.- Returns:
- the enricher spec.
- Since:
- 5.0.1
- See Also:
ContentEnricher.setErrorChannel(MessageChannel)
-
errorChannel
- Parameters:
errorChannel
- the name of the error channel bean.- Returns:
- the enricher spec.
- Since:
- 5.0.1
- See Also:
ContentEnricher.setErrorChannelName(String)
-
requestTimeout
- Parameters:
requestTimeout
- the requestTimeout- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setRequestTimeout(Long)
-
replyTimeout
- Parameters:
replyTimeout
- the replyTimeout- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setReplyTimeout(Long)
-
requestPayloadExpression
- Parameters:
requestPayloadExpression
- the requestPayloadExpression.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setRequestPayloadExpression(Expression)
-
requestPayload
- Type Parameters:
P
- the payload type.- Parameters:
requestPayloadFunction
- the requestPayloadFunction.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setRequestPayloadExpression(Expression)
,FunctionExpression
-
requestSubFlow
The request sub-flow.- Parameters:
subFlow
- the subFlowDefinition- Returns:
- the enricher spec
-
shouldClonePayload
- Parameters:
shouldClonePayload
- the shouldClonePayload.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setShouldClonePayload(boolean)
-
property
- Type Parameters:
V
- the value type.- Parameters:
key
- the key.value
- the value.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setPropertyExpressions(Map)
-
propertyExpression
- Parameters:
key
- the key.expression
- the expression.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setPropertyExpressions(Map)
-
propertyFunction
- Type Parameters:
P
- the payload type.- Parameters:
key
- the key.function
- the function (usually a JDK8 lambda).- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setPropertyExpressions(Map)
,FunctionExpression
-
header
Set a header with the value if it is not already present.- Type Parameters:
V
- the value type.- Parameters:
name
- the header name.value
- the value.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
-
header
- Type Parameters:
V
- the value type.- Parameters:
name
- the header name.value
- the value.overwrite
- true to overwrite the header if already present.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
-
headerExpression
Set a header with the expression evaluation if the header is not already present.- Parameters:
name
- the header name.expression
- the expression to be evaluated against the reply message to obtain the value.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
-
headerExpression
- Parameters:
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.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
-
headerFunction
Set a header with the function return value if the header is not already present.- Type Parameters:
P
- the payload type.- Parameters:
name
- the header name.function
- the function (usually a JDK8 lambda).- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
,FunctionExpression
-
headerFunction
public <P> EnricherSpec headerFunction(String name, Function<Message<P>,Object> function, Boolean overwrite)- Type Parameters:
P
- the payload type.- Parameters:
name
- the header name.function
- the function (usually a JDK8 lambda).overwrite
- true to overwrite the header if already present.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
,FunctionExpression
-
header
public <V> EnricherSpec header(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor)Set a header value using an explicitHeaderValueMessageProcessor
.- Type Parameters:
V
- the value type.- Parameters:
headerName
- the header name.headerValueMessageProcessor
- the headerValueMessageProcessor.- Returns:
- the enricher spec.
- See Also:
ContentEnricher.setHeaderExpressions(Map)
-
doGet
- Overrides:
doGet
in classConsumerEndpointSpec<EnricherSpec,ContentEnricher>
-