Package org.apache.camel.model
Class ProcessorDefinition<Type extends ProcessorDefinition<Type>>
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<Type>
-
- org.apache.camel.model.ProcessorDefinition<Type>
-
- All Implemented Interfaces:
Block
,org.apache.camel.NamedNode
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
- Direct Known Subclasses:
ChoiceDefinition
,ExpressionNode
,NoOutputDefinition
,OutputDefinition
public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>> extends OptionalIdentifiedDefinition<Type> implements Block
Base class for processor types that most XML types extend.
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
inheritErrorHandler
protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProcessorDefinition()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addInterceptStrategy(org.apache.camel.spi.InterceptStrategy strategy)
void
addOutput(ProcessorDefinition<?> output)
Adds the given definition as output to this blockExpressionClause<AggregateDefinition>
aggregate()
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.ExpressionClause<AggregateDefinition>
aggregate(org.apache.camel.AggregationStrategy aggregationStrategy)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.AggregateDefinition
aggregate(org.apache.camel.Expression correlationExpression)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.AggregateDefinition
aggregate(org.apache.camel.Expression correlationExpression, org.apache.camel.AggregationStrategy aggregationStrategy)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.Type
bean(Class<?> beanType)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Class<?> beanType, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Class<?> beanType, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Class<?> beanType, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Object bean)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Object bean, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Object bean, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Object bean, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Supplier<Object> bean)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Supplier<Object> bean, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineType
bean(Supplier<Object> bean, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineChoiceDefinition
choice()
Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clauseCircuitBreakerDefinition
circuitBreaker()
Creates a Circuit Breaker EIP.ClaimCheckDefinition
claimCheck()
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.Type
claimCheck(ClaimCheckOperation operation)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.Type
claimCheck(ClaimCheckOperation operation, String key)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.Type
claimCheck(ClaimCheckOperation operation, String key, String filter)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.void
clearOutput()
void
configureChild(ProcessorDefinition<?> output)
Strategy for children to do any custom configurationType
convertBodyTo(Class<?> type)
Converts the IN message body to the specified typeType
convertBodyTo(Class<?> type, boolean mandatory)
Converts the IN message body to the specified typeType
convertBodyTo(Class<?> type, String charset)
Converts the IN message body to the specified typeExpressionClause<DelayDefinition>
delay()
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.DelayDefinition
delay(long delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.DelayDefinition
delay(org.apache.camel.Expression delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.TryDefinition
doTry()
Creates a try/catch blockExpressionClause<DynamicRouterDefinition<Type>>
dynamicRouter()
Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.DynamicRouterDefinition<Type>
dynamicRouter(org.apache.camel.Expression expression)
Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.ProcessorDefinition<?>
end()
Ends the current blockChoiceDefinition
endChoice()
Ends the current block and returns back to thechoice()
DSL.CircuitBreakerDefinition
endCircuitBreaker()
Ends the current block and returns back to thecircuitBreaker()
DSL.CatchDefinition
endDoCatch()
Ends the current block and returns back to thedoCatch()
DSL.TryDefinition
endDoTry()
Ends the current block and returns back to thedoTry()
DSL.ProcessorDefinition<?>
endParent()
Strategy to allowProcessorDefinition
s to have special logic when using end() in the DSL to return back to the intended parent.RestDefinition
endRest()
Ends the current block and returns back to therest()
DSL.ExpressionClause<EnrichDefinition>
enrich()
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(EndpointProducerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.Type
enrich(EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.EnrichClause<ProcessorDefinition<Type>>
enrichWith(String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.EnrichClause<ProcessorDefinition<Type>>
enrichWith(String resourceUri, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.EnrichClause<ProcessorDefinition<Type>>
enrichWith(String resourceUri, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.EnrichClause<ProcessorDefinition<Type>>
enrichWith(EndpointProducerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.EnrichClause<ProcessorDefinition<Type>>
enrichWith(EndpointProducerBuilder resourceUri, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.EnrichClause<ProcessorDefinition<Type>>
enrichWith(EndpointProducerBuilder resourceUri, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.ExpressionClause<? extends FilterDefinition>
filter()
Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destinationFilterDefinition
filter(String language, String expression)
Message Filter EIP: Creates a predicate language expression which only if it is true then the exchange is forwarded to the destinationFilterDefinition
filter(ExpressionDefinition expression)
Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destinationFilterDefinition
filter(org.apache.camel.Predicate predicate)
Message Filter EIP: Creates a predicate which is applied and only if it is true then the exchange is forwarded to the destinationint
getIndex()
Gets the unique index number for when thisProcessorDefinition
was created by its constructor.List<org.apache.camel.spi.InterceptStrategy>
getInterceptStrategies()
String
getLabel()
Returns a label to describe this node such as the expression if some kind of expression nodeabstract List<ProcessorDefinition<?>>
getOutputs()
ProcessorDefinition<?>
getParent()
Type
id(String id)
Sets the id of this node.ExpressionClause<IdempotentConsumerDefinition>
idempotentConsumer()
Idempotent consumer EIP: Creates anIdempotentConsumer
using a fluent builder.IdempotentConsumerDefinition
idempotentConsumer(org.apache.camel.Expression messageIdExpression)
Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messagesIdempotentConsumerDefinition
idempotentConsumer(org.apache.camel.Expression messageIdExpression, org.apache.camel.spi.IdempotentRepository idempotentRepository)
Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messagesType
inheritErrorHandler(boolean inheritErrorHandler)
Sets whether or not to inherit the configured error handler.Type
inOnly(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.use to where you can specify the exchange pattern as wellType
inOnly(String uri)
Deprecated.use to where you can specify the exchange pattern as wellType
inOnly(String... uris)
Deprecated.use to where you can specify the exchange pattern as wellType
inOnly(org.apache.camel.Endpoint endpoint)
Deprecated.use to where you can specify the exchange pattern as wellType
inOnly(org.apache.camel.Endpoint... endpoints)
Deprecated.use to where you can specify the exchange pattern as wellType
inOut(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.use to where you can specify the exchange pattern as wellType
inOut(String uri)
Deprecated.use to where you can specify the exchange pattern as wellType
inOut(String... uris)
Deprecated.use to where you can specify the exchange pattern as wellType
inOut(org.apache.camel.Endpoint endpoint)
Deprecated.use to where you can specify the exchange pattern as wellType
inOut(org.apache.camel.Endpoint... endpoints)
Deprecated.use to where you can specify the exchange pattern as wellboolean
isAbstract()
Whether this model is abstract or not.Boolean
isInheritErrorHandler()
boolean
isTopLevelOnly()
Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.)boolean
isWrappingEntireOutput()
Whether this definition is wrapping the entire output.KameletDefinition
kamelet(String name)
Creates a Kamelet EIP.LoadBalanceDefinition
loadBalance()
Load Balancer EIP: Creates a loadbalanceLoadBalanceDefinition
loadBalance(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
Load Balancer EIP: Creates a loadbalanceType
log(String message)
Creates a log message to be logged at INFO level.Type
log(org.apache.camel.LoggingLevel loggingLevel, String message)
Creates a log message to be logged at the given level.Type
log(org.apache.camel.LoggingLevel loggingLevel, String logName, String message)
Creates a log message to be logged at the given level and name.Type
log(org.apache.camel.LoggingLevel loggingLevel, String logName, String marker, String message)
Creates a log message to be logged at the given level and name.Type
log(org.apache.camel.LoggingLevel loggingLevel, org.slf4j.Logger logger, String message)
Creates a log message to be logged at the given level using provided logger.Type
log(org.apache.camel.LoggingLevel loggingLevel, org.slf4j.Logger logger, String marker, String message)
Creates a log message to be logged at the given level using provided logger.ExpressionClause<LoopDefinition>
loop()
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.LoopDefinition
loop(int count)
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.LoopDefinition
loop(org.apache.camel.Expression expression)
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.ExpressionClause<LoopDefinition>
loopDoWhile()
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way using a fluent builder.LoopDefinition
loopDoWhile(org.apache.camel.Predicate predicate)
Loop EIP: Creates a while loop allowing to process the a message while the predicate matches and possibly process them in a different way.Type
markRollbackOnly()
Marks the exchange for rollback only.Type
markRollbackOnlyLast()
Marks the exchange for rollback only, but only for the last (current) transaction.DataFormatClause<ProcessorDefinition<Type>>
marshal()
DataFormat: Marshals the in body using aDataFormat
expression to define the format of the output which will be added to the out body.Type
marshal(String dataTypeRef)
DataFormat: Marshals the in body the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.Type
marshal(DataFormatDefinition dataFormatType)
DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.Type
marshal(org.apache.camel.spi.DataFormat dataFormat)
DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.MulticastDefinition
multicast()
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.MulticastDefinition
multicast(org.apache.camel.AggregationStrategy aggregationStrategy)
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.MulticastDefinition
multicast(org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing)
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.OnCompletionDefinition
onCompletion()
Adds a onCompletionSynchronization
hook that invoke this route as a callback when theExchange
has finished being processed.OnExceptionDefinition
onException(Class<? extends Throwable> exceptionType)
Exception clause for catching certain exceptions and handling them.OnExceptionDefinition
onException(Class<? extends Throwable>... exceptions)
Exception clause for catching certain exceptions and handling them.PipelineDefinition
pipeline()
Pipes and Filters EIP: Creates aPipeline
so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpointType
pipeline(String... uris)
Pipes and Filters EIP: Creates aPipeline
of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpointType
pipeline(Collection<org.apache.camel.Endpoint> endpoints)
Deprecated.Type
pipeline(org.apache.camel.Endpoint... endpoints)
Pipes and Filters EIP: Creates aPipeline
of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpointPolicyDefinition
policy(String ref)
Apply aPolicy
.PolicyDefinition
policy(org.apache.camel.spi.Policy policy)
Apply aPolicy
.ExpressionClause<PollEnrichDefinition>
pollEnrich()
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, long timeout, String aggregationStrategyRef)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, String aggregationStrategyRef)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(EndpointConsumerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(org.apache.camel.Expression expression, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.Type
pollEnrich(org.apache.camel.Expression expression, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(String resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(String resourceUri, long timeout, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(EndpointConsumerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(EndpointConsumerBuilder resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.EnrichClause<ProcessorDefinition<Type>>
pollEnrichWith(EndpointConsumerBuilder resourceUri, long timeout, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.void
preCreateProcessor()
Strategy to execute any custom logic before theProcessor
is created.ProcessClause<ProcessorDefinition<Type>>
process()
Message Translator EIP: Adds the custom processor using a fluent builder to this destination which could be a final destination, or could be a transformation in a pipelineType
process(String ref)
Message Translator EIP: Adds the custom processor reference to this destination which could be a final destination, or could be a transformation in a pipelineType
process(org.apache.camel.Processor processor)
Message Translator EIP: Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipelineExpressionClause<RecipientListDefinition<Type>>
recipientList()
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipientsExpressionClause<RecipientListDefinition<Type>>
recipientList(String delimiter)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipientsRecipientListDefinition<Type>
recipientList(org.apache.camel.Expression recipients)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients.RecipientListDefinition<Type>
recipientList(org.apache.camel.Expression recipients, String delimiter)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipientsType
removeHeader(String name)
Adds a processor which removes the header on the IN messageType
removeHeaders(String pattern)
Adds a processor which removes the headers on the IN messageType
removeHeaders(String pattern, String... excludePatterns)
Adds a processor which removes the headers on the IN messageType
removeProperties(String pattern)
Adds a processor which removes the properties in the exchangeType
removeProperties(String pattern, String... excludePatterns)
Adds a processor which removes the properties in the exchangeType
removeProperty(String name)
Adds a processor which removes the exchange propertyExpressionClause<ResequenceDefinition>
resequence()
Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.ResequenceDefinition
resequence(org.apache.camel.Expression expression)
Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.Type
rollback()
Marks the exchange for rollback only and sets an exception with a default message.Type
rollback(String message)
Marks the exchange for rollback and sets an exception with the provided message.Type
routeDescription(String description)
Set the route description for this routeType
routeGroup(String group)
Set the route group for this route.Type
routeId(String id)
Set the route id for this route.ExpressionClause<RoutingSlipDefinition<Type>>
routingSlip()
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.RoutingSlipDefinition<Type>
routingSlip(org.apache.camel.Expression expression)
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.RoutingSlipDefinition<Type>
routingSlip(org.apache.camel.Expression expression, String uriDelimiter)
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.SagaDefinition
saga()
Marks this route as participating in a saga.SamplingDefinition
sample()
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic on a route.SamplingDefinition
sample(long messageFrequency)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.SamplingDefinition
sample(long samplePeriod, TimeUnit unit)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.SamplingDefinition
sample(Duration samplePeriod)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.ExpressionClause<ProcessorDefinition<Type>>
script()
Executes a script (do not change the message body).Type
script(org.apache.camel.Expression expression)
Executes a script (do not change the message body).ServiceCallDefinition
serviceCall()
Calls the serviceType
serviceCall(String name)
Calls the serviceType
serviceCall(String name, String uri)
Calls the serviceExpressionClause<ProcessorDefinition<Type>>
setBody()
Message Translator EIP: Adds a processor which sets the body on the IN message<Result> Type
setBody(Function<org.apache.camel.Exchange,Result> function)
Message Translator EIP: Adds a processor which sets the body on the IN messageType
setBody(org.apache.camel.Expression expression)
Message Translator EIP: Adds a processor which sets the body on the IN messageType
setExchangePattern(org.apache.camel.ExchangePattern exchangePattern)
ExpressionClause<ProcessorDefinition<Type>>
setHeader(String name)
Adds a processor which sets the header on the IN messageType
setHeader(String name, Supplier<Object> supplier)
Adds a processor which sets the header on the IN messageType
setHeader(String name, org.apache.camel.Expression expression)
Adds a processor which sets the header on the IN messagevoid
setInheritErrorHandler(Boolean inheritErrorHandler)
void
setParent(ProcessorDefinition<?> parent)
ExpressionClause<ProcessorDefinition<Type>>
setProperty(String name)
Adds a processor which sets the exchange propertyType
setProperty(String name, Supplier<Object> supplier)
Adds a processor which sets the exchange propertyType
setProperty(String name, org.apache.camel.Expression expression)
Adds a processor which sets the exchange property<T> ExpressionClause<SortDefinition<T>>
sort()
Sorts the expressionType
sort(org.apache.camel.Expression expression)
Sorts the expression using a default sorting based on toString representation.<T> Type
sort(org.apache.camel.Expression expression, Comparator<T> comparator)
Sorts the expression using the given comparatorExpressionClause<SplitDefinition>
split()
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.SplitDefinition
split(org.apache.camel.Expression expression)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.SplitDefinition
split(org.apache.camel.Expression expression, String delimiter)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.SplitDefinition
split(org.apache.camel.Expression expression, org.apache.camel.AggregationStrategy aggregationStrategy)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.Type
startupOrder(int startupOrder)
StepDefinition
step()
Routes the message to a sequence of processors which is grouped together as one logical name.StepDefinition
step(String id)
Routes the message to a sequence of processors which is grouped together as one logical name.Type
stop()
Stops continue routing the currentExchange
and marks it as completed.ThreadsDefinition
threads()
Continues processing theExchange
using asynchronous routing engine.ThreadsDefinition
threads(int poolSize)
Continues processing theExchange
using asynchronous routing engine.ThreadsDefinition
threads(int poolSize, int maxPoolSize)
Continues processing theExchange
using asynchronous routing engine.ThreadsDefinition
threads(int poolSize, int maxPoolSize, String threadName)
Continues processing theExchange
using asynchronous routing engine.ExpressionClause<ThrottleDefinition>
throttle()
Throttler EIP: Creates a throttler using a fluent builder.ThrottleDefinition
throttle(long maximumRequestCount)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.ThrottleDefinition
throttle(org.apache.camel.Expression maximumRequestCount)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.ThrottleDefinition
throttle(org.apache.camel.Expression maximumRequestCount, long correlationExpressionKey)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.ThrottleDefinition
throttle(org.apache.camel.Expression maximumRequestCount, org.apache.camel.Expression correlationExpressionKey)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.Type
throwException(Class<? extends Exception> type, String message)
Sets the exception on theExchange
Type
throwException(Exception exception)
Sets the exception on theExchange
Type
to(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.Type
to(String uri)
Sends the exchange to the given endpointType
to(String... uris)
Sends the exchange to a list of endpointsType
to(EndpointProducerBuilder endpoint)
Sends the exchange to the given endpointType
to(EndpointProducerBuilder... endpoints)
Sends the exchange to a list of endpointsType
to(org.apache.camel.Endpoint endpoint)
Sends the exchange to the given endpointType
to(org.apache.camel.Endpoint... endpoints)
Sends the exchange to a list of endpointsType
to(org.apache.camel.ExchangePattern pattern, Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.Type
to(org.apache.camel.ExchangePattern pattern, String uri)
Sends the exchange with certain exchange pattern to the given endpointType
to(org.apache.camel.ExchangePattern pattern, String... uris)
Sends the exchange to a list of endpointsType
to(org.apache.camel.ExchangePattern pattern, EndpointProducerBuilder endpoint)
Sends the exchange with certain exchange pattern to the given endpointType
to(org.apache.camel.ExchangePattern pattern, EndpointProducerBuilder... endpoints)
Sends the exchange to a list of endpointsType
to(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint)
Sends the exchange with certain exchange pattern to the given endpointType
to(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint... endpoints)
Sends the exchange to a list of endpointsToDynamicDefinition
toD()
Sends the exchange to the given dynamic endpointType
toD(String uri)
Sends the exchange to the given dynamic endpointType
toD(String uri, boolean ignoreInvalidEndpoint)
Sends the exchange to the given dynamic endpointType
toD(String uri, int cacheSize)
Sends the exchange to the given dynamic endpointType
toD(EndpointProducerBuilder endpointProducerBuilder)
Sends the exchange to the given dynamic endpointType
toD(EndpointProducerBuilder endpointProducerBuilder, boolean ignoreInvalidEndpoint)
Sends the exchange to the given dynamic endpointType
toD(EndpointProducerBuilder endpointProducerBuilder, int cacheSize)
Sends the exchange to the given dynamic endpointType
toF(String uri, Object... args)
Sends the exchange to the given endpointTransactedDefinition
transacted()
Marks this route as transacted and uses the default transacted policy found in the registry.TransactedDefinition
transacted(String ref)
Marks this route as transacted.ExpressionClause<ProcessorDefinition<Type>>
transform()
Message Translator EIP: Adds a processor which sets the body on the OUT messageType
transform(org.apache.camel.Expression expression)
Message Translator EIP: Adds a processor which sets the body on the OUT messageDataFormatClause<ProcessorDefinition<Type>>
unmarshal()
DataFormat: Unmarshals the in body using aDataFormat
expression to define the format of the input message and the output will be set on the out message body.Type
unmarshal(String dataTypeRef)
DataFormat: Unmarshals the in body using the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.Type
unmarshal(DataFormatDefinition dataFormatType)
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.Type
unmarshal(org.apache.camel.spi.DataFormat dataFormat)
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.ExpressionClause<ValidateDefinition>
validate()
Creates a validation expression which only if it is true then the exchange is forwarded to the destination.ValidateDefinition
validate(org.apache.camel.Expression expression)
Creates a validation expression which only if it is true then the exchange is forwarded to the destination.ValidateDefinition
validate(org.apache.camel.Predicate predicate)
Creates a validation expression which only if it is true then the exchange is forwarded to the destination.WireTapDefinition<Type>
wireTap(String uri)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.WireTapDefinition<Type>
wireTap(EndpointProducerBuilder endpoint)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.WireTapDefinition<Type>
wireTap(org.apache.camel.Endpoint endpoint)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
-
-
-
-
Field Detail
-
log
protected final org.slf4j.Logger log
-
inheritErrorHandler
protected Boolean inheritErrorHandler
-
-
Method Detail
-
getIndex
public int getIndex()
Gets the unique index number for when thisProcessorDefinition
was created by its constructor. This can be used to know the order in which the definition was created when assembled as a route.- Returns:
- the index number
-
getOutputs
public abstract List<ProcessorDefinition<?>> getOutputs()
-
isTopLevelOnly
public boolean isTopLevelOnly()
Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.) If trying to add a top-level only definition to a nested output would fail in theaddOutput(ProcessorDefinition)
method.
-
isAbstract
public boolean isAbstract()
Whether this model is abstract or not. An abstract model is something that is used for configuring cross cutting concerns such as error handling, transaction policies, interceptors etc. Regular definitions is what is part of the route, such as ToDefinition, WireTapDefinition and the likes. Will by default return false to indicate regular definition, so all the abstract definitions must override this method and return true instead. This information is used in camel-spring to let Camel work a bit on the model provided by JAXB from the Spring XML file. This is needed to handle those cross cutting concerns properly. The Java DSL does not have this issue as it can work this out directly using the fluent builder methods.- Returns:
- true for abstract, otherwise false for regular.
-
isWrappingEntireOutput
public boolean isWrappingEntireOutput()
Whether this definition is wrapping the entire output. When a definition is wrapping the entire output, the check to ensure that a route definition is empty should be done on the wrapped output.- Returns:
- true when wrapping the entire output.
-
addOutput
public void addOutput(ProcessorDefinition<?> output)
Description copied from interface:Block
Adds the given definition as output to this block
-
clearOutput
public void clearOutput()
-
preCreateProcessor
public void preCreateProcessor()
Strategy to execute any custom logic before theProcessor
is created.
-
configureChild
public void configureChild(ProcessorDefinition<?> output)
Strategy for children to do any custom configuration- Parameters:
output
- the child to be added as output to this
-
to
public Type to(@AsEndpointUri String uri)
Sends the exchange to the given endpoint- Parameters:
uri
- the endpoint to send to- Returns:
- the builder
-
toD
public ToDynamicDefinition toD()
Sends the exchange to the given dynamic endpoint- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri String uri)
Sends the exchange to the given dynamic endpoint- Parameters:
uri
- the dynamic endpoint to send to (resolved using simple language by default)- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri EndpointProducerBuilder endpointProducerBuilder)
Sends the exchange to the given dynamic endpoint- Parameters:
endpointProducerBuilder
- the dynamic endpoint to send to (resolved using simple language by default)- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri String uri, int cacheSize)
Sends the exchange to the given dynamic endpoint- Parameters:
uri
- the dynamic endpoint to send to (resolved using simple language by default)cacheSize
- sets the maximum size used by theProducerCache
which is used to cache and reuse producers.- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri EndpointProducerBuilder endpointProducerBuilder, int cacheSize)
Sends the exchange to the given dynamic endpoint- Parameters:
endpointProducerBuilder
- the dynamic endpoint to send to (resolved using simple language by default)cacheSize
- sets the maximum size used by theProducerCache
which is used to cache and reuse producers.- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri String uri, boolean ignoreInvalidEndpoint)
Sends the exchange to the given dynamic endpoint- Parameters:
uri
- the dynamic endpoint to send to (resolved using simple language by default)ignoreInvalidEndpoint
- ignore the invalidate endpoint exception when try to create a producer with that endpoint- Returns:
- the builder
-
toD
public Type toD(@AsEndpointUri EndpointProducerBuilder endpointProducerBuilder, boolean ignoreInvalidEndpoint)
Sends the exchange to the given dynamic endpoint- Parameters:
endpointProducerBuilder
- the dynamic endpoint to send to (resolved using simple language by default)ignoreInvalidEndpoint
- ignore the invalidate endpoint exception when try to create a producer with that endpoint- Returns:
- the builder
-
toF
public Type toF(@AsEndpointUri String uri, Object... args)
Sends the exchange to the given endpoint- Parameters:
uri
- the String formatted endpoint uri to send toargs
- arguments for the string formatting of the uri- Returns:
- the builder
-
serviceCall
public ServiceCallDefinition serviceCall()
Calls the service- Returns:
- the builder
-
serviceCall
public Type serviceCall(String name)
Calls the service- Parameters:
name
- the service name- Returns:
- the builder
-
serviceCall
public Type serviceCall(String name, @AsEndpointUri String uri)
Calls the service- Parameters:
name
- the service nameuri
- the endpoint uri to use for calling the service- Returns:
- the builder
-
to
public Type to(org.apache.camel.Endpoint endpoint)
Sends the exchange to the given endpoint- Parameters:
endpoint
- the endpoint to send to- Returns:
- the builder
-
to
public Type to(@AsEndpointUri EndpointProducerBuilder endpoint)
Sends the exchange to the given endpoint- Parameters:
endpoint
- the endpoint to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, @AsEndpointUri String uri)
Sends the exchange with certain exchange pattern to the given endpoint Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangeuri
- the endpoint to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint)
Sends the exchange with certain exchange pattern to the given endpoint Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangeendpoint
- the endpoint to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, EndpointProducerBuilder endpoint)
Sends the exchange with certain exchange pattern to the given endpoint Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangeendpoint
- the endpoint to send to- Returns:
- the builder
-
to
public Type to(@AsEndpointUri String... uris)
Sends the exchange to a list of endpoints- Parameters:
uris
- list of endpoints to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.Endpoint... endpoints)
Sends the exchange to a list of endpoints- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
to
@Deprecated public Type to(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.Sends the exchange to a list of endpoints- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
to
public Type to(@AsEndpointUri EndpointProducerBuilder... endpoints)
Sends the exchange to a list of endpoints- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, @AsEndpointUri String... uris)
Sends the exchange to a list of endpoints Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangesuris
- list of endpoints to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint... endpoints)
Sends the exchange to a list of endpoints Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangesendpoints
- list of endpoints to send to- Returns:
- the builder
-
to
@Deprecated public Type to(org.apache.camel.ExchangePattern pattern, Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.Sends the exchange to a list of endpoints- Parameters:
pattern
- the pattern to use for the message exchangesendpoints
- list of endpoints to send to- Returns:
- the builder
-
to
public Type to(org.apache.camel.ExchangePattern pattern, @AsEndpointUri EndpointProducerBuilder... endpoints)
Sends the exchange to a list of endpoints Notice the existing MEP is preserved- Parameters:
pattern
- the pattern to use for the message exchangesendpoints
- list of endpoints to send to- Returns:
- the builder
-
setExchangePattern
public Type setExchangePattern(org.apache.camel.ExchangePattern exchangePattern)
ExchangePattern: set theExchangePattern
into theExchange
. The pattern set on theExchange
will be changed from this point going foward.- Parameters:
exchangePattern
- instance ofExchangePattern
- Returns:
- the builder
-
inOnly
@Deprecated public Type inOnly(@AsEndpointUri String uri)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoint using an Event Message or InOnly exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
uri
- The endpoint uri which is used for sending the exchange- Returns:
- the builder
-
inOnly
@Deprecated public Type inOnly(org.apache.camel.Endpoint endpoint)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoint using an Event Message or InOnly exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoint
- The endpoint which is used for sending the exchange- Returns:
- the builder
-
inOnly
@Deprecated public Type inOnly(@AsEndpointUri String... uris)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Event Message or InOnly exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
uris
- list of endpoints to send to- Returns:
- the builder
-
inOnly
@Deprecated public Type inOnly(@AsEndpointUri org.apache.camel.Endpoint... endpoints)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Event Message or InOnly exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
inOnly
@Deprecated public Type inOnly(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Event Message or InOnly exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
inOut
@Deprecated public Type inOut(@AsEndpointUri String uri)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoint using an Request Reply or InOut exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
uri
- The endpoint uri which is used for sending the exchange- Returns:
- the builder
-
inOut
@Deprecated public Type inOut(org.apache.camel.Endpoint endpoint)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoint using an Request Reply or InOut exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoint
- The endpoint which is used for sending the exchange- Returns:
- the builder
-
inOut
@Deprecated public Type inOut(@AsEndpointUri String... uris)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Request Reply or InOut exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
uris
- list of endpoints to send to- Returns:
- the builder
-
inOut
@Deprecated public Type inOut(org.apache.camel.Endpoint... endpoints)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Request Reply or InOut exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
inOut
@Deprecated public Type inOut(Iterable<org.apache.camel.Endpoint> endpoints)
Deprecated.use to where you can specify the exchange pattern as wellSends the message to the given endpoints using an Request Reply or InOut exchange pattern Notice the existing MEP is restored after the message has been sent to the given endpoint.- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
id
public Type id(String id)
Sets the id of this node. Important: If you want to set the id of the route, then you must userouteId(String)
instead.- Overrides:
id
in classOptionalIdentifiedDefinition<Type extends ProcessorDefinition<Type>>
- Parameters:
id
- the id- Returns:
- the builder
-
routeId
public Type routeId(String id)
Set the route id for this route. Important: Each route in the sameCamelContext
must have an unique route id. If you use the API fromCamelContext
orModelCamelContext
to add routes, then any new routes which has a route id that matches an old route, then the old route is replaced by the new route.- Parameters:
id
- the route id, should be unique- Returns:
- the builder
-
routeGroup
public Type routeGroup(String group)
Set the route group for this route.- Parameters:
group
- the route group- Returns:
- the builder
-
routeDescription
public Type routeDescription(String description)
Set the route description for this route- Parameters:
description
- the route description- Returns:
- the builder
-
multicast
public MulticastDefinition multicast()
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.- Returns:
- the builder
-
multicast
public MulticastDefinition multicast(org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing)
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.- Parameters:
aggregationStrategy
- the strategy used to aggregate responses for every partparallelProcessing
- if is true camel will fork thread to call the endpoint producer- Returns:
- the builder
-
multicast
public MulticastDefinition multicast(org.apache.camel.AggregationStrategy aggregationStrategy)
Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.- Parameters:
aggregationStrategy
- the strategy used to aggregate responses for every part- Returns:
- the builder
-
step
public StepDefinition step()
Routes the message to a sequence of processors which is grouped together as one logical name.- Returns:
- the builder
-
step
public StepDefinition step(String id)
Routes the message to a sequence of processors which is grouped together as one logical name.- Parameters:
id
- unique id of the step within the camel context- Returns:
- the builder
-
pipeline
public PipelineDefinition pipeline()
Pipes and Filters EIP: Creates aPipeline
so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint- Returns:
- the builder
-
pipeline
public Type pipeline(@AsEndpointUri String... uris)
Pipes and Filters EIP: Creates aPipeline
of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint- Parameters:
uris
- list of endpoints- Returns:
- the builder
-
pipeline
public Type pipeline(org.apache.camel.Endpoint... endpoints)
Pipes and Filters EIP: Creates aPipeline
of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint- Parameters:
endpoints
- list of endpoints- Returns:
- the builder
-
pipeline
@Deprecated public Type pipeline(Collection<org.apache.camel.Endpoint> endpoints)
Deprecated.Pipes and Filters EIP: Creates aPipeline
of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint- Parameters:
endpoints
- list of endpoints- Returns:
- the builder
-
threads
public ThreadsDefinition threads()
Continues processing theExchange
using asynchronous routing engine.- Returns:
- the builder
-
threads
public ThreadsDefinition threads(int poolSize)
Continues processing theExchange
using asynchronous routing engine.- Parameters:
poolSize
- the core pool size- Returns:
- the builder
-
threads
public ThreadsDefinition threads(int poolSize, int maxPoolSize)
Continues processing theExchange
using asynchronous routing engine.- Parameters:
poolSize
- the core pool sizemaxPoolSize
- the maximum pool size- Returns:
- the builder
-
threads
public ThreadsDefinition threads(int poolSize, int maxPoolSize, String threadName)
Continues processing theExchange
using asynchronous routing engine.- Parameters:
poolSize
- the core pool sizemaxPoolSize
- the maximum pool sizethreadName
- the thread pool name- Returns:
- the builder
-
end
public ProcessorDefinition<?> end()
Ends the current block- Returns:
- the builder
-
endParent
public ProcessorDefinition<?> endParent()
Strategy to allowProcessorDefinition
s to have special logic when using end() in the DSL to return back to the intended parent. For example a content based router we return back to theChoiceDefinition
when we end() from aWhenDefinition
.- Returns:
- the end
-
endChoice
public ChoiceDefinition endChoice()
Ends the current block and returns back to thechoice()
DSL. Important: If you want to end the entire choice block, then useend()
instead. The purpose ofendChoice()
is to return control back to thechoice()
DSL, so you can add subsequent when and otherwise to the choice. There can be situations where you would need to useendChoice()
often when you add additional EIPs inside the when's, and the DSLlooses scope when using a regularend()
, and you would need to use thisendChoice()
to return back the scope to thechoice()
DSL. For more details and examples see also this FAQ: Why can I not use when or otherwise in a Java Camel route .- Returns:
- the choice builder
-
endRest
public RestDefinition endRest()
Ends the current block and returns back to therest()
DSL.- Returns:
- the builder
-
endDoTry
public TryDefinition endDoTry()
Ends the current block and returns back to thedoTry()
DSL.- Returns:
- the builder
-
endDoCatch
public CatchDefinition endDoCatch()
Ends the current block and returns back to thedoCatch()
DSL.- Returns:
- the builder
-
endCircuitBreaker
public CircuitBreakerDefinition endCircuitBreaker()
Ends the current block and returns back to thecircuitBreaker()
DSL.- Returns:
- the builder
-
idempotentConsumer
public ExpressionClause<IdempotentConsumerDefinition> idempotentConsumer()
Idempotent consumer EIP: Creates anIdempotentConsumer
using a fluent builder.
-
idempotentConsumer
public IdempotentConsumerDefinition idempotentConsumer(org.apache.camel.Expression messageIdExpression)
Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messages- Parameters:
messageIdExpression
- expression to test of duplicate messages- Returns:
- the builder
-
idempotentConsumer
public IdempotentConsumerDefinition idempotentConsumer(org.apache.camel.Expression messageIdExpression, org.apache.camel.spi.IdempotentRepository idempotentRepository)
Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messages- Parameters:
messageIdExpression
- expression to test of duplicate messagesidempotentRepository
- the repository to use for duplicate check- Returns:
- the builder
-
filter
@AsPredicate public ExpressionClause<? extends FilterDefinition> filter()
Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destination- Returns:
- the clause used to create the filter expression
-
filter
public FilterDefinition filter(@AsPredicate org.apache.camel.Predicate predicate)
Message Filter EIP: Creates a predicate which is applied and only if it is true then the exchange is forwarded to the destination- Parameters:
predicate
- predicate to use- Returns:
- the builder
-
filter
public FilterDefinition filter(@AsPredicate ExpressionDefinition expression)
Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destination- Parameters:
expression
- the predicate expression to use- Returns:
- the builder
-
filter
public FilterDefinition filter(String language, @AsPredicate String expression)
Message Filter EIP: Creates a predicate language expression which only if it is true then the exchange is forwarded to the destination- Parameters:
language
- language for expressionexpression
- the expression- Returns:
- the builder
-
validate
public ValidateDefinition validate(@AsPredicate org.apache.camel.Expression expression)
Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise aPredicateValidationException
is thrown.- Parameters:
expression
- the expression- Returns:
- the builder
-
validate
public ValidateDefinition validate(@AsPredicate org.apache.camel.Predicate predicate)
Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise aPredicateValidationException
is thrown.- Parameters:
predicate
- the predicate- Returns:
- the builder
-
validate
@AsPredicate public ExpressionClause<ValidateDefinition> validate()
Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise aPredicateValidationException
is thrown.- Returns:
- the builder
-
circuitBreaker
public CircuitBreakerDefinition circuitBreaker()
Creates a Circuit Breaker EIP. This requires having an implementation on the classpath such as camel-hystrix, or camel-microprofile-fault-tolerance.- Returns:
- the builder
-
kamelet
public KameletDefinition kamelet(String name)
Creates a Kamelet EIP. This requires having camel-kamelet on the classpath.- Returns:
- the builder
-
loadBalance
public LoadBalanceDefinition loadBalance()
Load Balancer EIP: Creates a loadbalance- Returns:
- the builder
-
loadBalance
public LoadBalanceDefinition loadBalance(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
Load Balancer EIP: Creates a loadbalance- Parameters:
loadBalancer
- a custom load balancer to use- Returns:
- the builder
-
log
public Type log(String message)
Creates a log message to be logged at INFO level.- Parameters:
message
- the log message (you can use simple language syntax)- Returns:
- the builder
-
log
public Type log(org.apache.camel.LoggingLevel loggingLevel, String message)
Creates a log message to be logged at the given level.- Parameters:
loggingLevel
- the logging level to usemessage
- the log message (you can use simple language syntax)- Returns:
- the builder
-
log
public Type log(org.apache.camel.LoggingLevel loggingLevel, String logName, String message)
Creates a log message to be logged at the given level and name.- Parameters:
loggingLevel
- the logging level to uselogName
- the log name to usemessage
- the log message (you can use simple language syntax)- Returns:
- the builder
-
log
public Type log(org.apache.camel.LoggingLevel loggingLevel, org.slf4j.Logger logger, String message)
Creates a log message to be logged at the given level using provided logger.- Parameters:
loggingLevel
- the logging level to uselogger
- the logger to usemessage
- the log message (you can use simple language syntax)- Returns:
- the builder
-
log
public Type log(org.apache.camel.LoggingLevel loggingLevel, String logName, String marker, String message)
Creates a log message to be logged at the given level and name.- Parameters:
loggingLevel
- the logging level to uselogName
- the log name to usemarker
- log marker namemessage
- the log message (you can use simple language syntax)- Returns:
- the builder
-
log
public Type log(org.apache.camel.LoggingLevel loggingLevel, org.slf4j.Logger logger, String marker, String message)
Creates a log message to be logged at the given level using provided logger.- Parameters:
loggingLevel
- the logging level to uselogger
- the logger to usemarker
- log marker namemessage
- the log message (you can use simple language syntax)- Returns:
- the builder
-
choice
public ChoiceDefinition choice()
Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clause- Returns:
- the builder for a choice expression
-
doTry
public TryDefinition doTry()
Creates a try/catch block- Returns:
- the builder for a tryBlock expression
-
recipientList
public RecipientListDefinition<Type> recipientList(@AsEndpointUri org.apache.camel.Expression recipients)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients. Will use comma as default delimiter.- Parameters:
recipients
- expression to decide the destinations- Returns:
- the builder
-
recipientList
public RecipientListDefinition<Type> recipientList(@AsEndpointUri org.apache.camel.Expression recipients, String delimiter)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients- Parameters:
recipients
- expression to decide the destinationsdelimiter
- a custom delimiter to use- Returns:
- the builder
-
recipientList
@AsEndpointUri public ExpressionClause<RecipientListDefinition<Type>> recipientList(String delimiter)
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients- Parameters:
delimiter
- a custom delimiter to use- Returns:
- the builder
-
recipientList
@AsEndpointUri public ExpressionClause<RecipientListDefinition<Type>> recipientList()
Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients- Returns:
- the expression clause to configure the expression to decide the destinations
-
routingSlip
public RoutingSlipDefinition<Type> routingSlip(@AsEndpointUri org.apache.camel.Expression expression, String uriDelimiter)
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message. The route slip will be evaluated once, usedynamicRouter()
if you need even more dynamic routing.- Parameters:
expression
- to decide the destinationsuriDelimiter
- is the delimiter that will be used to split up the list of URIs in the routing slip.- Returns:
- the builder
-
routingSlip
public RoutingSlipDefinition<Type> routingSlip(@AsEndpointUri org.apache.camel.Expression expression)
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message. The list of URIs will be split based on the default delimiterRoutingSlipDefinition.DEFAULT_DELIMITER
The route slip will be evaluated once, usedynamicRouter()
if you need even more dynamic routing.- Parameters:
expression
- to decide the destinations- Returns:
- the builder
-
routingSlip
public ExpressionClause<RoutingSlipDefinition<Type>> routingSlip()
Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message. The list of URIs will be split based on the default delimiterRoutingSlipDefinition.DEFAULT_DELIMITER
The route slip will be evaluated once, usedynamicRouter()
if you need even more dynamic routing.- Returns:
- the expression clause to configure the expression to decide the destinations
-
dynamicRouter
public DynamicRouterDefinition<Type> dynamicRouter(@AsEndpointUri org.apache.camel.Expression expression)
Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.
Important: The expression will be invoked repeatedly until it returns null, so be sure it does that, otherwise it will be invoked endlessly.- Parameters:
expression
- to decide the destinations, which will be invoked repeatedly until it evaluates null to indicate no more destinations.- Returns:
- the builder
-
dynamicRouter
@AsEndpointUri public ExpressionClause<DynamicRouterDefinition<Type>> dynamicRouter()
Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.
Important: The expression will be invoked repeatedly until it returns null, so be sure it does that, otherwise it will be invoked endlessly.- Returns:
- the expression clause to configure the expression to decide the destinations, which will be invoked repeatedly until it evaluates null to indicate no more destinations.
-
sample
public SamplingDefinition sample()
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic on a route. It is configured with a sampling period, during which only a single exchange is allowed to pass through. All other exchanges will be stopped. Default period is one second.- Returns:
- the builder
-
sample
public SamplingDefinition sample(Duration samplePeriod)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during which only a single exchange is allowed to pass through. All other exchanges will be stopped.- Parameters:
samplePeriod
- this is the sample interval, only one exchange is allowed through in this interval- Returns:
- the builder
-
sample
public SamplingDefinition sample(long samplePeriod, TimeUnit unit)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during which only a single exchange is allowed to pass through. All other exchanges will be stopped.- Parameters:
samplePeriod
- this is the sample interval, only one exchange is allowed through in this intervalunit
- this is the units for the samplePeriod e.g. Seconds- Returns:
- the builder
-
sample
public SamplingDefinition sample(long messageFrequency)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling message frequency during which only a single exchange is allowed to pass through. All other exchanges will be stopped.- Parameters:
messageFrequency
- this is the sample message frequency, only one exchange is allowed through for this many messages received- Returns:
- the builder
-
split
public ExpressionClause<SplitDefinition> split()
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.This splitter responds with the original input message. You can use a custom
AggregationStrategy
to control what to respond from the splitter.- Returns:
- the expression clause builder for the expression on which to split
-
split
public SplitDefinition split(org.apache.camel.Expression expression)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.This splitter responds with the original input message. You can use a custom
AggregationStrategy
to control what to respond from the splitter.- Parameters:
expression
- the expression on which to split the message- Returns:
- the builder
-
split
public SplitDefinition split(org.apache.camel.Expression expression, String delimiter)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.This splitter responds with the original input message. You can use a custom
AggregationStrategy
to control what to respond from the splitter.- Parameters:
expression
- the expression on which to split the messagedelimiter
- a custom delimiter to use- Returns:
- the builder
-
split
public SplitDefinition split(org.apache.camel.Expression expression, org.apache.camel.AggregationStrategy aggregationStrategy)
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.The splitter responds with the answer produced by the given
AggregationStrategy
.- Parameters:
expression
- the expression on which to splitaggregationStrategy
- the strategy used to aggregate responses for every part- Returns:
- the builder
-
resequence
public ExpressionClause<ResequenceDefinition> resequence()
Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.- Returns:
- the expression clause for the expressions on which to compare messages in order
-
resequence
public ResequenceDefinition resequence(org.apache.camel.Expression expression)
Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.- Parameters:
expression
- the expression on which to compare messages in order- Returns:
- the builder
-
aggregate
public ExpressionClause<AggregateDefinition> aggregate()
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.- Returns:
- the expression clause to be used as builder to configure the correlation expression
-
aggregate
public ExpressionClause<AggregateDefinition> aggregate(org.apache.camel.AggregationStrategy aggregationStrategy)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.- Parameters:
aggregationStrategy
- the strategy used for the aggregation- Returns:
- the expression clause to be used as builder to configure the correlation expression
-
aggregate
public AggregateDefinition aggregate(org.apache.camel.Expression correlationExpression)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.- Parameters:
correlationExpression
- the expression used to calculate the correlation key. For a JMS message this could be the expressionheader("JMSDestination")
orheader("JMSCorrelationID")
- Returns:
- the builder
-
aggregate
public AggregateDefinition aggregate(org.apache.camel.Expression correlationExpression, org.apache.camel.AggregationStrategy aggregationStrategy)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.- Parameters:
correlationExpression
- the expression used to calculate the correlation key. For a JMS message this could be the expressionheader("JMSDestination")
orheader("JMSCorrelationID")
aggregationStrategy
- the strategy used for the aggregation- Returns:
- the builder
-
delay
public DelayDefinition delay(org.apache.camel.Expression delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.- Parameters:
delay
- an expression to calculate the delay time in millis- Returns:
- the builder
-
delay
public ExpressionClause<DelayDefinition> delay()
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.- Returns:
- the expression clause to create the expression
-
delay
public DelayDefinition delay(long delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.- Parameters:
delay
- the delay in millis- Returns:
- the builder
-
throttle
public ExpressionClause<ThrottleDefinition> throttle()
Throttler EIP: Creates a throttler using a fluent builder.- Returns:
- the builder
-
throttle
public ThrottleDefinition throttle(long maximumRequestCount)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service. Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.- Parameters:
maximumRequestCount
- the maximum messages- Returns:
- the builder
-
throttle
public ThrottleDefinition throttle(org.apache.camel.Expression maximumRequestCount)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service. Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.- Parameters:
maximumRequestCount
- an expression to calculate the maximum request count- Returns:
- the builder
-
throttle
public ThrottleDefinition throttle(org.apache.camel.Expression maximumRequestCount, long correlationExpressionKey)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service. Here another parameter correlationExpressionKey is introduced for the functionality which will throttle based on the key expression to group exchanges. This will make key-based throttling instead of overall throttling. Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.- Parameters:
maximumRequestCount
- an expression to calculate the maximum request countcorrelationExpressionKey
- is a correlation key that can throttle by the given key instead of overall throttling- Returns:
- the builder
-
throttle
public ThrottleDefinition throttle(org.apache.camel.Expression maximumRequestCount, org.apache.camel.Expression correlationExpressionKey)
Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service. Here another parameter correlationExpressionKey is introduced for the functionality which will throttle based on the key expression to group exchanges. This will make key-based throttling instead of overall throttling. Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.- Parameters:
maximumRequestCount
- an expression to calculate the maximum request countcorrelationExpressionKey
- is a correlation key as an expression that can throttle by the given key instead of overall throttling- Returns:
- the builder
-
loop
public ExpressionClause<LoopDefinition> loop()
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way. Useful mostly for testing.- Returns:
- the clause used to create the loop expression
-
loop
public LoopDefinition loop(org.apache.camel.Expression expression)
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.- Parameters:
expression
- the loop expression- Returns:
- the builder
-
loopDoWhile
public LoopDefinition loopDoWhile(@AsPredicate org.apache.camel.Predicate predicate)
Loop EIP: Creates a while loop allowing to process the a message while the predicate matches and possibly process them in a different way.- Parameters:
predicate
- the while loop predicate- Returns:
- the builder
-
loopDoWhile
public ExpressionClause<LoopDefinition> loopDoWhile()
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way using a fluent builder.- Returns:
- the builder
-
loop
public LoopDefinition loop(int count)
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.- Parameters:
count
- the number of times- Returns:
- the builder
-
throwException
public Type throwException(Exception exception)
Sets the exception on theExchange
- Parameters:
exception
- the exception to throw- Returns:
- the builder
-
throwException
public Type throwException(Class<? extends Exception> type, String message)
Sets the exception on theExchange
- Parameters:
type
- the exception class to usemessage
- the given message as caused message (supports simple language)- Returns:
- the builder
-
markRollbackOnly
public Type markRollbackOnly()
Marks the exchange for rollback only. Does not set any exception as opposed torollback()
methods.- Returns:
- the builder
- See Also:
rollback()
,rollback(String)
,markRollbackOnlyLast()
-
markRollbackOnlyLast
public Type markRollbackOnlyLast()
Marks the exchange for rollback only, but only for the last (current) transaction. A last rollback is used when you have nested transactions and only want the last local transaction to rollback, where as the outer transaction can still be completed Does not set any exception as opposed torollback()
methods.- Returns:
- the builder
- See Also:
rollback()
,rollback(String)
,markRollbackOnly()
-
rollback
public Type rollback()
Marks the exchange for rollback only and sets an exception with a default message. This is done by setting aRollbackExchangeException
on the Exchange and mark it for rollback.- Returns:
- the builder
- See Also:
markRollbackOnly()
-
rollback
public Type rollback(String message)
Marks the exchange for rollback and sets an exception with the provided message. This is done by setting aRollbackExchangeException
on the Exchange and mark it for rollback.- Parameters:
message
- an optional message used for logging purpose why the rollback was triggered- Returns:
- the builder
- See Also:
markRollbackOnly()
-
wireTap
public WireTapDefinition<Type> wireTap(org.apache.camel.Endpoint endpoint)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.- Parameters:
endpoint
- the endpoint to wiretap to- Returns:
- the builder
-
wireTap
public WireTapDefinition<Type> wireTap(@AsEndpointUri EndpointProducerBuilder endpoint)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.- Parameters:
endpoint
- the endpoint to wiretap to- Returns:
- the builder
-
wireTap
public WireTapDefinition<Type> wireTap(@AsEndpointUri String uri)
WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other usingExchangePattern.InOnly
.- Parameters:
uri
- the dynamic endpoint to wiretap to (resolved using simple language by default)- Returns:
- the builder
-
startupOrder
public Type startupOrder(int startupOrder)
-
stop
public Type stop()
Stops continue routing the currentExchange
and marks it as completed.- Returns:
- the builder
-
onException
public OnExceptionDefinition onException(Class<? extends Throwable> exceptionType)
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptionType
- the exception to catch- Returns:
- the exception builder to configure
-
onException
public OnExceptionDefinition onException(Class<? extends Throwable>... exceptions)
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptions
- list of exceptions to catch- Returns:
- the exception builder to configure
-
policy
public PolicyDefinition policy(org.apache.camel.spi.Policy policy)
Apply aPolicy
. Policy can be used for transactional policies.- Parameters:
policy
- the policy to apply- Returns:
- the policy builder to configure
-
policy
public PolicyDefinition policy(String ref)
Apply aPolicy
. Policy can be used for transactional policies.- Parameters:
ref
- reference to lookup a policy in the registry- Returns:
- the policy builder to configure
-
transacted
public TransactedDefinition transacted()
Marks this route as transacted and uses the default transacted policy found in the registry.- Returns:
- the policy builder to configure
-
transacted
public TransactedDefinition transacted(String ref)
Marks this route as transacted.- Parameters:
ref
- reference to lookup a transacted policy in the registry- Returns:
- the policy builder to configure
-
saga
public SagaDefinition saga()
Marks this route as participating in a saga.- Returns:
- the saga definition
-
process
public Type process(org.apache.camel.Processor processor)
Message Translator EIP: Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline- Parameters:
processor
- the customProcessor
- Returns:
- the builder
-
process
public Type process(String ref)
Message Translator EIP: Adds the custom processor reference to this destination which could be a final destination, or could be a transformation in a pipeline- Parameters:
ref
- reference to aProcessor
to lookup in the registry- Returns:
- the builder
-
process
public ProcessClause<ProcessorDefinition<Type>> process()
Message Translator EIP: Adds the custom processor using a fluent builder to this destination which could be a final destination, or could be a transformation in a pipeline- Returns:
- the builder
-
bean
public Type bean(Object bean)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a String- Returns:
- the builder
-
bean
public Type bean(Supplier<Object> bean)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a String- Returns:
- the builder
-
bean
public Type bean(Object bean, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a Stringmethod
- the method name to invoke on the bean (can be used to avoid ambiguity)- Returns:
- the builder
-
bean
public Type bean(Supplier<Object> bean, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a Stringmethod
- the method name to invoke on the bean (can be used to avoid ambiguity)- Returns:
- the builder
-
bean
public Type bean(Supplier<Object> bean, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a Stringmethod
- the method name to invoke on the bean (can be used to avoid ambiguity)scope
- bean scope to use (singleton, request, prototype)- Returns:
- the builder
-
bean
public Type bean(Object bean, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a Stringscope
- bean scope to use (singleton, request, prototype)- Returns:
- the builder
-
bean
public Type bean(Object bean, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
bean
- the bean to invoke, or a reference to a bean if the type is a Stringmethod
- the method name to invoke on the bean (can be used to avoid ambiguity)scope
- bean scope to use (singleton, request, prototype)- Returns:
- the builder
-
bean
public Type bean(Class<?> beanType)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
beanType
- the bean class, Camel will instantiate an object at runtime- Returns:
- the builder
-
bean
public Type bean(Class<?> beanType, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
beanType
- the bean class, Camel will instantiate an object at runtimescope
- bean scope to use (singleton, request, prototype)- Returns:
- the builder
-
bean
public Type bean(Class<?> beanType, String method)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
beanType
- the bean class, Camel will instantiate an object at runtimemethod
- the method name to invoke on the bean (can be used to avoid ambiguity)- Returns:
- the builder
-
bean
public Type bean(Class<?> beanType, String method, org.apache.camel.BeanScope scope)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline- Parameters:
beanType
- the bean class, Camel will instantiate an object at runtimemethod
- the method name to invoke on the bean (can be used to avoid ambiguity)scope
- bean scope to use (singleton, request, prototype)- Returns:
- the builder
-
setBody
public ExpressionClause<ProcessorDefinition<Type>> setBody()
Message Translator EIP: Adds a processor which sets the body on the IN message- Returns:
- a expression builder clause to set the body
-
setBody
public Type setBody(org.apache.camel.Expression expression)
Message Translator EIP: Adds a processor which sets the body on the IN message- Parameters:
expression
- the expression used to set the body- Returns:
- the builder
-
setBody
public <Result> Type setBody(Function<org.apache.camel.Exchange,Result> function)
Message Translator EIP: Adds a processor which sets the body on the IN message- Parameters:
function
- the function that provides a value to the IN message body- Returns:
- the builder
-
transform
public Type transform(org.apache.camel.Expression expression)
Message Translator EIP: Adds a processor which sets the body on the OUT message- Parameters:
expression
- the expression used to set the body- Returns:
- the builder
-
transform
public ExpressionClause<ProcessorDefinition<Type>> transform()
Message Translator EIP: Adds a processor which sets the body on the OUT message- Returns:
- a expression builder clause to set the body
-
script
public Type script(org.apache.camel.Expression expression)
Executes a script (do not change the message body).- Parameters:
expression
- the expression used as the script.- Returns:
- the builder
-
script
public ExpressionClause<ProcessorDefinition<Type>> script()
Executes a script (do not change the message body).- Returns:
- a expression builder clause to use as script.
-
setHeader
public ExpressionClause<ProcessorDefinition<Type>> setHeader(String name)
Adds a processor which sets the header on the IN message- Parameters:
name
- the header name- Returns:
- a expression builder clause to set the header
-
setHeader
public Type setHeader(String name, org.apache.camel.Expression expression)
Adds a processor which sets the header on the IN message- Parameters:
name
- the header nameexpression
- the expression used to set the header- Returns:
- the builder
-
setHeader
public Type setHeader(String name, Supplier<Object> supplier)
Adds a processor which sets the header on the IN message- Parameters:
name
- the header namesupplier
- the supplier used to set the header- Returns:
- the builder
-
setProperty
public Type setProperty(String name, org.apache.camel.Expression expression)
Adds a processor which sets the exchange property- Parameters:
name
- the property nameexpression
- the expression used to set the property- Returns:
- the builder
-
setProperty
public Type setProperty(String name, Supplier<Object> supplier)
Adds a processor which sets the exchange property- Parameters:
name
- the property namesupplier
- the supplier used to set the property- Returns:
- the builder
-
setProperty
public ExpressionClause<ProcessorDefinition<Type>> setProperty(String name)
Adds a processor which sets the exchange property- Parameters:
name
- the property name- Returns:
- a expression builder clause to set the property
-
removeHeader
public Type removeHeader(String name)
Adds a processor which removes the header on the IN message- Parameters:
name
- the header name- Returns:
- the builder
-
removeHeaders
public Type removeHeaders(String pattern)
Adds a processor which removes the headers on the IN message- Parameters:
pattern
- a pattern to match header names to be removed- Returns:
- the builder
-
removeHeaders
public Type removeHeaders(String pattern, String... excludePatterns)
Adds a processor which removes the headers on the IN message- Parameters:
pattern
- a pattern to match header names to be removedexcludePatterns
- one or more pattern of header names that should be excluded (= preserved)- Returns:
- the builder
-
removeProperty
public Type removeProperty(String name)
Adds a processor which removes the exchange property- Parameters:
name
- the property name- Returns:
- the builder
-
removeProperties
public Type removeProperties(String pattern)
Adds a processor which removes the properties in the exchange- Parameters:
pattern
- a pattern to match properties names to be removed- Returns:
- the builder
-
removeProperties
public Type removeProperties(String pattern, String... excludePatterns)
Adds a processor which removes the properties in the exchange- Parameters:
pattern
- a pattern to match properties names to be removedexcludePatterns
- one or more pattern of properties names that should be excluded (= preserved)- Returns:
- the builder
-
convertBodyTo
public Type convertBodyTo(Class<?> type)
Converts the IN message body to the specified type- Parameters:
type
- the type to convert to- Returns:
- the builder
-
convertBodyTo
public Type convertBodyTo(Class<?> type, boolean mandatory)
Converts the IN message body to the specified type- Parameters:
type
- the type to convert tomandatory
- whether to use mandatory type conversion or not- Returns:
- the builder
-
convertBodyTo
public Type convertBodyTo(Class<?> type, String charset)
Converts the IN message body to the specified type- Parameters:
type
- the type to convert tocharset
- the charset to use by type converters (not all converters support specific charset)- Returns:
- the builder
-
sort
public Type sort(org.apache.camel.Expression expression)
Sorts the expression using a default sorting based on toString representation.- Parameters:
expression
- the expression, must be convertable toList
- Returns:
- the builder
-
sort
public <T> Type sort(org.apache.camel.Expression expression, Comparator<T> comparator)
Sorts the expression using the given comparator- Parameters:
expression
- the expression, must be convertable toList
comparator
- the comparator to use for sorting- Returns:
- the builder
-
sort
public <T> ExpressionClause<SortDefinition<T>> sort()
Sorts the expression- Returns:
- the builder
-
claimCheck
public ClaimCheckDefinition claimCheck()
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.
-
claimCheck
public Type claimCheck(ClaimCheckOperation operation)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.- Parameters:
operation
- the claim check operation to use.
-
claimCheck
public Type claimCheck(ClaimCheckOperation operation, String key)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.- Parameters:
operation
- the claim check operation to use.key
- the unique key to use for the get and set operations, can be null for push/pop operations
-
claimCheck
public Type claimCheck(ClaimCheckOperation operation, String key, String filter)
The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.- Parameters:
operation
- the claim check operation to use.key
- the unique key to use for the get and set operations, can be null for push/pop operationsfilter
- describes what data to include/exclude when merging data back when using get or pop operations.
-
enrich
public Type enrich(@AsEndpointUri String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
. The difference between this andpollEnrich(String)
is that this uses a producer to obatin the additional data, where as pollEnrich uses a polling consumer.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri EndpointProducerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
. The difference between this andpollEnrich(String)
is that this uses a producer to obatin the additional data, where as pollEnrich uses a polling consumer.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.fom("direct:start") .enrichWith("direct:resource") .body(String.class, (o, n) -> n + o);
- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri String resourceUri, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri String resourceUri, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri EndpointProducerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.fom("direct:start") .enrichWith("direct:resource") .body(String.class, (o, n) -> n + o);
- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
Enricher
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri EndpointProducerBuilder resourceUri, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.
-
enrichWith
public EnrichClause<ProcessorDefinition<Type>> enrichWith(@AsEndpointUri EndpointProducerBuilder resourceUri, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder.
-
enrich
public Type enrich(@AsEndpointUri String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.shareUnitOfWork
- whether to share unit of work- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
Enricher
-
enrich
public Type enrich(@AsEndpointUri EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException, boolean shareUnitOfWork)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.shareUnitOfWork
- whether to share unit of work- Returns:
- the builder
- See Also:
Enricher
-
enrich
@AsEndpointUri public ExpressionClause<EnrichDefinition> enrich()
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
. The difference between this andpollEnrich(String)
is that this uses a producer to obtain the additional data, where as pollEnrich uses a polling consumer.- Returns:
- a expression builder clause to set the expression to use for computing the endpoint to use
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. This method will block until data is available, use the method with timeout if you do not want to risk waiting a long time before data is available from the resourceUri.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. This method will block until data is available, use the method with timeout if you do not want to risk waiting a long time before data is available from the resourceUri.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, long timeout, String aggregationStrategyRef)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategyRef
- Reference of aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(EndpointConsumerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. This method will block until data is available, use the method with timeout if you do not want to risk waiting a long time before data is available from the resourceUri.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(EndpointConsumerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. This method will block until data is available, use the method with timeout if you do not want to risk waiting a long time before data is available from the resourceUri.- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(EndpointConsumerBuilder resourceUri, long timeout, String aggregationStrategyRef)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategyRef
- Reference of aggregation strategy to aggregate input data and additional data.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(@AsEndpointUri String resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(@AsEndpointUri String resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(@AsEndpointUri String resourceUri, long timeout, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(EndpointConsumerBuilder resourceUri)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(EndpointConsumerBuilder resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrichWith
public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(EndpointConsumerBuilder resourceUri, long timeout, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
and with an aggregation strategy created using a fluent builder using aPollingConsumer
to poll the endpoint.
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategyRef
- Reference of aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri String resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri EndpointConsumerBuilder resourceUri, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri EndpointConsumerBuilder resourceUri, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.aggregationStrategyRef
- Reference of aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri EndpointConsumerBuilder resourceUri, long timeout)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri org.apache.camel.Expression expression, long timeout, String aggregationStrategyRef, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
expression
- to use an expression to dynamically compute the endpoint to poll fromtimeout
- timeout in millis to wait at most for data to be available.aggregationStrategyRef
- Reference of aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
public Type pollEnrich(@AsEndpointUri org.apache.camel.Expression expression, long timeout, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException)
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Parameters:
expression
- to use an expression to dynamically compute the endpoint to poll fromtimeout
- timeout in millis to wait at most for data to be available.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.aggregateOnException
- whether to callAggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange)
if an exception was thrown.- Returns:
- the builder
- See Also:
PollEnricher
-
pollEnrich
@AsEndpointUri public ExpressionClause<PollEnrichDefinition> pollEnrich()
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint. The difference between this andenrich(String)
is that this uses a consumer to obtain the additional data, where as enrich uses a producer. The timeout controls which operation to use onPollingConsumer
. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).- Returns:
- a expression builder clause to set the expression to use for computing the endpoint to poll from
- See Also:
PollEnricher
-
onCompletion
public OnCompletionDefinition onCompletion()
Adds a onCompletionSynchronization
hook that invoke this route as a callback when theExchange
has finished being processed. The hook invoke callbacks for either onComplete or onFailure. Will by default always trigger when theExchange
is complete (either with success or failed).
You can limit the callback to either onComplete or onFailure but invoking the nested builder method. For onFailure the caused exception is stored as a property on theExchange
with the keyExchange.EXCEPTION_CAUGHT
.- Returns:
- the builder
-
unmarshal
public DataFormatClause<ProcessorDefinition<Type>> unmarshal()
DataFormat: Unmarshals the in body using aDataFormat
expression to define the format of the input message and the output will be set on the out message body.- Returns:
- the expression to create the
DataFormat
-
unmarshal
public Type unmarshal(DataFormatDefinition dataFormatType)
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormatType
- the dataformat- Returns:
- the builder
-
unmarshal
public Type unmarshal(org.apache.camel.spi.DataFormat dataFormat)
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormat
- the dataformat- Returns:
- the builder
-
unmarshal
public Type unmarshal(String dataTypeRef)
DataFormat: Unmarshals the in body using the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.- Parameters:
dataTypeRef
- reference to aDataFormat
to lookup in the registry- Returns:
- the builder
-
marshal
public DataFormatClause<ProcessorDefinition<Type>> marshal()
DataFormat: Marshals the in body using aDataFormat
expression to define the format of the output which will be added to the out body.- Returns:
- the expression to create the
DataFormat
-
marshal
public Type marshal(DataFormatDefinition dataFormatType)
DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormatType
- the dataformat- Returns:
- the builder
-
marshal
public Type marshal(org.apache.camel.spi.DataFormat dataFormat)
DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormat
- the dataformat- Returns:
- the builder
-
marshal
public Type marshal(String dataTypeRef)
DataFormat: Marshals the in body the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.- Parameters:
dataTypeRef
- reference to aDataFormat
to lookup in the registry- Returns:
- the builder
-
inheritErrorHandler
public Type inheritErrorHandler(boolean inheritErrorHandler)
Sets whether or not to inherit the configured error handler.
The default value is true. You can use this to disable using the inherited error handler for a given DSL such as a load balancer where you want to use a custom error handler strategy.- Parameters:
inheritErrorHandler
- whether to not to inherit the error handler for this node- Returns:
- the builder
-
getParent
public ProcessorDefinition<?> getParent()
- Specified by:
getParent
in interfaceorg.apache.camel.NamedNode
- Overrides:
getParent
in classOptionalIdentifiedDefinition<Type extends ProcessorDefinition<Type>>
-
setParent
public void setParent(ProcessorDefinition<?> parent)
-
getInterceptStrategies
public List<org.apache.camel.spi.InterceptStrategy> getInterceptStrategies()
-
addInterceptStrategy
public void addInterceptStrategy(org.apache.camel.spi.InterceptStrategy strategy)
-
isInheritErrorHandler
public Boolean isInheritErrorHandler()
-
setInheritErrorHandler
public void setInheritErrorHandler(Boolean inheritErrorHandler)
-
getLabel
public String getLabel()
Returns a label to describe this node such as the expression if some kind of expression node- Specified by:
getLabel
in interfaceorg.apache.camel.NamedNode
-
-