@Metadata(label="eip,transformation") public class EnrichDefinition extends NoOutputExpressionNode
Enricher
inheritErrorHandler, log
Constructor and Description |
---|
EnrichDefinition() |
EnrichDefinition(AggregationStrategy aggregationStrategy) |
Modifier and Type | Method and Description |
---|---|
EnrichDefinition |
aggregateOnException(boolean aggregateOnException)
If this option is false then the aggregate method is not used if there was an exception thrown while trying
to retrieve the data to enrich from the resource.
|
EnrichDefinition |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message.
|
EnrichDefinition |
aggregationStrategyMethodAllowNull(boolean aggregationStrategyMethodAllowNull)
If this option is false then the aggregate method is not used if there was no data to enrich.
|
EnrichDefinition |
aggregationStrategyMethodName(String aggregationStrategyMethodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
EnrichDefinition |
aggregationStrategyRef(String aggregationStrategyRef)
Refers to an AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message.
|
EnrichDefinition |
cacheSize(int cacheSize)
Sets the maximum size used by the
ProducerCache which is used
to cache and reuse producer when uris are reused. |
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
Boolean |
getAggregateOnException() |
AggregationStrategy |
getAggregationStrategy() |
Boolean |
getAggregationStrategyMethodAllowNull() |
String |
getAggregationStrategyMethodName() |
String |
getAggregationStrategyRef() |
Integer |
getCacheSize() |
Boolean |
getIgnoreInvalidEndpoint() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
Boolean |
getShareUnitOfWork() |
EnrichDefinition |
ignoreInvalidEndpoint()
Ignore the invalidate endpoint exception when try to create a producer with that endpoint
|
void |
setAggregateOnException(Boolean aggregateOnException) |
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy) |
void |
setAggregationStrategyMethodAllowNull(Boolean aggregationStrategyMethodAllowNull) |
void |
setAggregationStrategyMethodName(String aggregationStrategyMethodName) |
void |
setAggregationStrategyRef(String aggregationStrategyRef) |
void |
setCacheSize(Integer cacheSize) |
void |
setExpression(ExpressionDefinition expression)
Expression that computes the endpoint uri to use as the resource endpoint to enrich from
|
void |
setIgnoreInvalidEndpoint(Boolean ignoreInvalidEndpoint) |
void |
setShareUnitOfWork(Boolean shareUnitOfWork) |
EnrichDefinition |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and the resource exchange. |
String |
toString() |
addOutput, getOutputs, id, isOutputSupported
configureChild, createFilterProcessor, createPredicate, getExpression, preCreateProcessor, setOutputs
addInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createOutputsProcessorImpl, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endHystrix, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrichRef, enrichRef, enrichRef, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, hystrix, idempotentConsumer, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, pollEnrichWith, pollEnrichWith, pollEnrichWith, process, process, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapChannel, wrapInErrorHandler, wrapProcessor
description, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setId
public EnrichDefinition()
public EnrichDefinition(AggregationStrategy aggregationStrategy)
public String getLabel()
ProcessorDefinition
getLabel
in interface NamedNode
getLabel
in class ExpressionNode
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<ExpressionNode>
Exception
public EnrichDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
public EnrichDefinition aggregationStrategyRef(String aggregationStrategyRef)
public EnrichDefinition aggregationStrategyMethodName(String aggregationStrategyMethodName)
public EnrichDefinition aggregationStrategyMethodAllowNull(boolean aggregationStrategyMethodAllowNull)
public EnrichDefinition aggregateOnException(boolean aggregateOnException)
public EnrichDefinition shareUnitOfWork()
UnitOfWork
with the parent and the resource exchange.
Enrich will by default not share unit of work between the parent exchange and the resource exchange.
This means the resource exchange has its own individual unit of work.public EnrichDefinition cacheSize(int cacheSize)
ProducerCache
which is used
to cache and reuse producer when uris are reused.cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public EnrichDefinition ignoreInvalidEndpoint()
public void setExpression(ExpressionDefinition expression)
setExpression
in class ExpressionNode
public String getAggregationStrategyRef()
public void setAggregationStrategyRef(String aggregationStrategyRef)
public String getAggregationStrategyMethodName()
public void setAggregationStrategyMethodName(String aggregationStrategyMethodName)
public Boolean getAggregationStrategyMethodAllowNull()
public void setAggregationStrategyMethodAllowNull(Boolean aggregationStrategyMethodAllowNull)
public AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public Boolean getAggregateOnException()
public void setAggregateOnException(Boolean aggregateOnException)
public Boolean getShareUnitOfWork()
public void setShareUnitOfWork(Boolean shareUnitOfWork)
public Integer getCacheSize()
public void setCacheSize(Integer cacheSize)
public Boolean getIgnoreInvalidEndpoint()
public void setIgnoreInvalidEndpoint(Boolean ignoreInvalidEndpoint)
Apache Camel