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<?>>headerExpressionsprotected Map<String,Expression>propertyExpressionsFields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Constructor Summary
Constructors Modifier Constructor Description protectedEnricherSpec() -
Method Summary
Modifier and Type Method Description protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,ContentEnricher>doGet()EnricherSpecerrorChannel(String errorChannel)EnricherSpecerrorChannel(MessageChannel errorChannel)<V> EnricherSpecheader(String headerName, HeaderValueMessageProcessor<V> headerValueMessageProcessor)Set a header value using an explicitHeaderValueMessageProcessor.<V> EnricherSpecheader(String name, V value)Set a header with the value if it is not already present.<V> EnricherSpecheader(String name, V value, Boolean overwrite)EnricherSpecheaderExpression(String name, String expression)Set a header with the expression evaluation if the header is not already present.EnricherSpecheaderExpression(String name, String expression, Boolean overwrite)<P> EnricherSpecheaderFunction(String name, Function<Message<P>,Object> function)Set a header with the function return value if the header is not already present.<P> EnricherSpecheaderFunction(String name, Function<Message<P>,Object> function, Boolean overwrite)<V> EnricherSpecproperty(String key, V value)EnricherSpecpropertyExpression(String key, String expression)<P> EnricherSpecpropertyFunction(String key, Function<Message<P>,Object> function)EnricherSpecreplyChannel(String replyChannel)EnricherSpecreplyChannel(MessageChannel replyChannel)EnricherSpecreplyTimeout(Long replyTimeout)EnricherSpecrequestChannel(String requestChannel)EnricherSpecrequestChannel(MessageChannel requestChannel)<P> EnricherSpecrequestPayload(Function<Message<P>,?> requestPayloadFunction)EnricherSpecrequestPayloadExpression(String requestPayloadExpression)EnricherSpecrequestSubFlow(IntegrationFlow subFlow)The request sub-flow.EnricherSpecrequestTimeout(Long requestTimeout)EnricherSpecshouldClonePayload(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, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods 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:
doGetin classConsumerEndpointSpec<EnricherSpec,ContentEnricher>
-