public class EnricherSpec extends ConsumerEndpointSpec<EnricherSpec,ContentEnricher>
ConsumerEndpointSpec
extension for the ContentEnricher
.Modifier and Type | Field and Description |
---|---|
protected Map<String,HeaderValueMessageProcessor<?>> |
headerExpressions |
protected Map<String,Expression> |
propertyExpressions |
adviceChain
componentsToRegister, endpointFactoryBean, handler
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
EnricherSpec() |
advice, async, autoStartup, customizeMonoReply, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final Map<String,Expression> propertyExpressions
protected final Map<String,HeaderValueMessageProcessor<?>> headerExpressions
public EnricherSpec requestChannel(MessageChannel requestChannel)
requestChannel
- the request channel.ContentEnricher.setRequestChannel(MessageChannel)
public EnricherSpec requestChannel(String requestChannel)
requestChannel
- the request channel.ContentEnricher.setRequestChannelName(String)
public EnricherSpec replyChannel(MessageChannel replyChannel)
replyChannel
- the reply channel.ContentEnricher.setReplyChannel(MessageChannel)
public EnricherSpec replyChannel(String replyChannel)
replyChannel
- the reply channel.ContentEnricher.setReplyChannelName(String)
public EnricherSpec errorChannel(MessageChannel errorChannel)
errorChannel
- the error channel.ContentEnricher.setErrorChannel(MessageChannel)
public EnricherSpec errorChannel(String errorChannel)
errorChannel
- the name of the error channel bean.ContentEnricher.setErrorChannelName(String)
public EnricherSpec requestTimeout(Long requestTimeout)
requestTimeout
- the requestTimeoutContentEnricher.setRequestTimeout(Long)
public EnricherSpec replyTimeout(Long replyTimeout)
replyTimeout
- the replyTimeoutContentEnricher.setReplyTimeout(Long)
public EnricherSpec requestPayloadExpression(String requestPayloadExpression)
requestPayloadExpression
- the requestPayloadExpression.ContentEnricher.setRequestPayloadExpression(Expression)
public <P> EnricherSpec requestPayload(java.util.function.Function<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(String key, V value)
V
- the value type.key
- the key.value
- the value.ContentEnricher.setPropertyExpressions(Map)
public EnricherSpec propertyExpression(String key, String expression)
key
- the key.expression
- the expression.ContentEnricher.setPropertyExpressions(Map)
public <P> EnricherSpec propertyFunction(String key, java.util.function.Function<Message<P>,Object> function)
P
- the payload type.key
- the key.function
- the function (usually a JDK8 lambda).ContentEnricher.setPropertyExpressions(Map)
,
FunctionExpression
public <V> EnricherSpec header(String name, V value)
V
- the value type.name
- the header name.value
- the value.ContentEnricher.setHeaderExpressions(Map)
public <V> EnricherSpec header(String name, V value, 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(String name, 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(String name, String expression, 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(String name, java.util.function.Function<Message<P>,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(String name, java.util.function.Function<Message<P>,Object> function, 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(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>