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
A
ConsumerEndpointSpec
extension for the ContentEnricher
.- Since:
- 5.0
- Author:
- Artem Bilan, Tim Ysewyn, Ian Bondoc, Alexis Hafner
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
HeaderValueMessageProcessor<?>> protected final Map<String,
Expression> Fields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
adviceChain
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,
ContentEnricher> doGet()
errorChannel
(String errorChannel) errorChannel
(MessageChannel errorChannel) <V> EnricherSpec
header
(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor) Set a header value using an explicitHeaderValueMessageProcessor
.<V> EnricherSpec
Set a header with the value if it is not already present.<V> EnricherSpec
headerExpression
(String name, String expression) Set a header with the expression evaluation if the header is not already present.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
<V> EnricherSpec
propertyExpression
(String key, String expression) <P> EnricherSpec
propertyFunction
(String key, Function<Message<P>, Object> function) replyChannel
(String replyChannel) replyChannel
(MessageChannel replyChannel) replyTimeout
(Long replyTimeout) requestChannel
(String requestChannel) requestChannel
(MessageChannel requestChannel) <P> EnricherSpec
requestPayload
(Function<Message<P>, ?> requestPayloadFunction) requestPayloadExpression
(String requestPayloadExpression) requestSubFlow
(IntegrationFlow subFlow) The request sub-flow.requestTimeout
(Long requestTimeout) 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
-
propertyExpressions
-
headerExpressions
-
-
Constructor Details
-
EnricherSpec
protected EnricherSpec()
-
-
Method Details
-
requestChannel
- Parameters:
requestChannel
- the request channel.- Returns:
- the enricher spec.
- See Also:
-
requestChannel
- Parameters:
requestChannel
- the request channel.- Returns:
- the enricher spec.
- See Also:
-
replyChannel
- Parameters:
replyChannel
- the reply channel.- Returns:
- the enricher spec.
- See Also:
-
replyChannel
- Parameters:
replyChannel
- the reply channel.- Returns:
- the enricher spec.
- See Also:
-
errorChannel
- Parameters:
errorChannel
- the error channel.- Returns:
- the enricher spec.
- Since:
- 5.0.1
- See Also:
-
errorChannel
- Parameters:
errorChannel
- the name of the error channel bean.- Returns:
- the enricher spec.
- Since:
- 5.0.1
- See Also:
-
requestTimeout
- Parameters:
requestTimeout
- the requestTimeout- Returns:
- the enricher spec.
- See Also:
-
replyTimeout
- Parameters:
replyTimeout
- the replyTimeout- Returns:
- the enricher spec.
- See Also:
-
requestPayloadExpression
- Parameters:
requestPayloadExpression
- the requestPayloadExpression.- Returns:
- the enricher spec.
- See Also:
-
requestPayload
- Type Parameters:
P
- the payload type.- Parameters:
requestPayloadFunction
- the requestPayloadFunction.- Returns:
- the enricher spec.
- See Also:
-
requestSubFlow
The request sub-flow.- Parameters:
subFlow
- the subFlowDefinition- Returns:
- the enricher spec
-
shouldClonePayload
- Parameters:
shouldClonePayload
- the shouldClonePayload.- Returns:
- the enricher spec.
- See Also:
-
property
- Type Parameters:
V
- the value type.- Parameters:
key
- the key.value
- the value.- Returns:
- the enricher spec.
- See Also:
-
propertyExpression
- Parameters:
key
- the key.expression
- the expression.- Returns:
- the enricher spec.
- See Also:
-
propertyFunction
- Type Parameters:
P
- the payload type.- Parameters:
key
- the key.function
- the function (usually a JDK8 lambda).- Returns:
- the enricher spec.
- See Also:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
doGet
- Overrides:
doGet
in classConsumerEndpointSpec<EnricherSpec,
ContentEnricher>
-