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:
org.apache.camel.CamelContextAware
,org.apache.camel.LineNumberAware
,Block
,org.apache.camel.NamedNode
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
- Direct Known Subclasses:
ChoiceDefinition
,ExpressionNode
,NoOutputDefinition
,OnFallbackDefinition
,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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInterceptStrategy
(org.apache.camel.spi.InterceptStrategy strategy) void
addOutput
(ProcessorDefinition<?> output) Adds the given definition as output to this blockAggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.aggregate
(org.apache.camel.AggregationStrategy aggregationStrategy) Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.aggregate
(org.apache.camel.Expression correlationExpression) Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.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.Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelineMessage Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipelinechoice()
Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clauseCreates a Circuit Breaker EIP.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
(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.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.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
void
configureChild
(ProcessorDefinition<?> output) Strategy for children to do any custom configurationconvertBodyTo
(Class<?> type) Converts the IN message body to the specified typeconvertBodyTo
(Class<?> type, boolean mandatory) Converts the IN message body to the specified typeconvertBodyTo
(Class<?> type, String charset) Converts the IN message body to the specified typedelay()
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.delay
(long delay) Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.delay
(org.apache.camel.Expression delay) Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.disabled()
Disables this EIP from the route during build time.disabled
(boolean disabled) Whether to disable this EIP from the route during build time.Whether to disable this EIP from the route during build time.doTry()
Creates a try/catch blockDynamic 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.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.end()
Ends the current blockEnds the current block and returns back to thechoice()
DSL.Ends the current block and returns back to thecircuitBreaker()
DSL.Ends the current block and returns back to thedoCatch()
DSL.endDoTry()
Ends the current block and returns back to thedoTry()
DSL.Strategy to allowProcessorDefinition
s to have special logic when using end() in the DSL to return back to the intended parent.enrich()
The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.enrich
(String resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.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
.enrich
(EndpointProducerBuilder resourceUri) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.enrich
(EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.enrich
(EndpointProducerBuilder resourceUri, org.apache.camel.AggregationStrategy aggregationStrategy, boolean aggregateOnException) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
.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
.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.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.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.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.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.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 destinationMessage Filter EIP: Creates a predicate language expression which only if it is true then the exchange is forwarded to the destinationfilter
(ExpressionDefinition expression) Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destinationfilter
(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>
getLabel()
Returns a label to describe this node such as the expression if some kind of expression nodeabstract List<ProcessorDefinition<?>>
Sets the id of this node.Idempotent consumer EIP: Creates anIdempotentConsumer
using a fluent builder.idempotentConsumer
(org.apache.camel.Expression messageIdExpression) Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messagesidempotentConsumer
(org.apache.camel.Expression messageIdExpression, org.apache.camel.spi.IdempotentRepository idempotentRepository) Idempotent consumer EIP: Creates anIdempotentConsumer
to avoid duplicate messagesinheritErrorHandler
(boolean inheritErrorHandler) Sets whether or not to inherit the configured error handler.boolean
Whether this model is abstract or not.boolean
Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.)boolean
Whether this definition is wrapping the entire output.Creates a Kamelet EIP.Load Balancer EIP: Creates a loadbalanceloadBalance
(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer) Load Balancer EIP: Creates a loadbalanceCreates a log message to be logged at INFO level.Creates a log message to be logged at the given level.Creates a log message to be logged at the given level and name.Creates a log message to be logged at the given level and name.Creates a log message to be logged at the given level using provided logger.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.loop()
Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.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.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.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.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.Marks the exchange for rollback only.Marks the exchange for rollback only, but only for the last (current) transaction.marshal()
DataFormat: Marshals the in body using aDataFormat
expression to define the format of the output which will be added to the out body.DataFormat: Marshals the in body the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.marshal
(DataFormatDefinition dataFormatType) DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.marshal
(org.apache.camel.spi.DataFormat dataFormat) DataFormat: Marshals the in body using the specifiedDataFormat
and sets the output on the out message body.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.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.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.nodePrefixId
(String prefixId) Sets a prefix to use for all node ids (not route id).Adds a onCompletionSynchronization
hook that invoke this route as a callback when theExchange
has finished being processed.onException
(Class<? extends Throwable> exceptionType) Exception clause for catching certain exceptions and handling them.final OnExceptionDefinition
onException
(Class<? extends Throwable>... exceptions) Exception clause for catching certain exceptions and handling them.onException
(Class<? extends Throwable> exceptionType1, Class<? extends Throwable> exceptionType2) Exception clause for catching certain exceptions and handling them.onException
(Class<? extends Throwable> exceptionType1, Class<? extends Throwable> exceptionType2, Class<? extends Throwable> exceptionType3) Exception clause for catching certain exceptions and handling them.pausable()
This enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operationThis enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operationThis enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operationThis enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operationpipeline()
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 endpointPipes 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 endpointpipeline
(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 endpointApply aPolicy
.policy
(org.apache.camel.spi.Policy policy) Apply aPolicy
.The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.pollEnrich
(String resourceUri) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.pollEnrich
(String resourceUri, long timeout) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.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.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.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.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.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.pollEnrich
(EndpointConsumerBuilder resourceUri) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.pollEnrich
(EndpointConsumerBuilder resourceUri, long timeout) The Content Enricher EIP enriches an exchange with additional data obtained from aresourceUri
using aPollingConsumer
to poll the endpoint.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.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.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.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.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.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.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.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.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.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.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
(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
(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
Strategy to execute any custom logic before theProcessor
is created.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 pipelineMessage Translator EIP: Adds the custom processor reference to this destination which could be a final destination, or could be a transformation in a pipelineprocess
(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 pipelineRecipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipientsrecipientList
(String delimiter) Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipientsrecipientList
(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.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 recipientsremoveHeader
(String name) Adds a processor which removes the header on the IN messageremoveHeaders
(String pattern) Adds a processor which removes the headers on the IN messageremoveHeaders
(String pattern, String... excludePatterns) Adds a processor which removes the headers on the IN messageremoveProperties
(String pattern) Adds a processor which removes the properties in the exchangeremoveProperties
(String pattern, String... excludePatterns) Adds a processor which removes the properties in the exchangeremoveProperty
(String name) Adds a processor which removes the exchange propertyResequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.resequence
(org.apache.camel.Expression expression) Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.resumable
(org.apache.camel.resume.ResumeStrategy resumeStrategy) This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.rollback()
Marks the exchange for rollback only and sets an exception with a default message.Marks the exchange for rollback and sets an exception with the provided message.routeDescription
(String description) Set the route description for this routerouteGroup
(String group) Set the route group for this route.Set the route id for this route.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.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.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.saga()
Marks this route as participating in a saga.sample()
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic on a route.sample
(long messageFrequency) Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.script()
Executes a script (do not change the message body).script
(org.apache.camel.Expression expression) Executes a script (do not change the message body).Deprecated.serviceCall
(String name) Deprecated.serviceCall
(String name, String uri) Deprecated.setBody()
Message Translator EIP: Adds a processor which sets the body on the IN message<Result> Type
Message Translator EIP: Adds a processor which sets the body on the IN messagesetBody
(org.apache.camel.Expression expression) Message Translator EIP: Adds a processor which sets the body on the IN messagevoid
setDisabled
(String disabled) setExchangePattern
(String exchangePattern) setExchangePattern
(org.apache.camel.ExchangePattern exchangePattern) Adds a processor which sets the header on the IN messageAdds a processor which sets the header on the IN messageAdds a processor which sets the header on the IN messagevoid
setInheritErrorHandler
(Boolean inheritErrorHandler) void
setParent
(ProcessorDefinition<?> parent) setProperty
(String name) Adds a processor which sets the exchange propertysetProperty
(String name, Supplier<Object> supplier) Adds a processor which sets the exchange propertysetProperty
(String name, org.apache.camel.Expression expression) Adds a processor which sets the exchange propertyvoid
setRouteConfiguration
(RouteConfigurationDefinition routeConfiguration) <T> ExpressionClause<SortDefinition<T>>
sort()
Sorts the expressionsort
(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 comparatorsplit()
Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.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.Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.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.startupOrder
(int startupOrder) step()
Routes the message to a sequence of processors which is grouped together as one logical name.Routes the message to a sequence of processors which is grouped together as one logical name.stop()
Stops continue routing the currentExchange
and marks it as completed.threads()
Continues processing theExchange
using asynchronous routing engine.threads
(int poolSize) Continues processing theExchange
using asynchronous routing engine.threads
(int poolSize, int maxPoolSize) Continues processing theExchange
using asynchronous routing engine.Continues processing theExchange
using asynchronous routing engine.throttle()
Throttler EIP: Creates a throttler using a fluent builder.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.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.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.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.throwException
(Class<? extends Exception> type, String message) Sets the exception on theExchange
throwException
(Exception exception) Sets the exception on theExchange
Sends the exchange to the given endpointSends the exchange to a list of endpointsto
(EndpointProducerBuilder endpoint) Sends the exchange to the given endpointto
(EndpointProducerBuilder... endpoints) Sends the exchange to a list of endpointsto
(org.apache.camel.Endpoint endpoint) Sends the exchange to the given endpointto
(org.apache.camel.Endpoint... endpoints) Sends the exchange to a list of endpointsSends the exchange with certain exchange pattern to the given endpointSends the exchange to a list of endpointsto
(org.apache.camel.ExchangePattern pattern, EndpointProducerBuilder endpoint) Sends the exchange with certain exchange pattern to the given endpointto
(org.apache.camel.ExchangePattern pattern, EndpointProducerBuilder... endpoints) Sends the exchange to a list of endpointsto
(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint endpoint) Sends the exchange with certain exchange pattern to the given endpointto
(org.apache.camel.ExchangePattern pattern, org.apache.camel.Endpoint... endpoints) Sends the exchange to a list of endpointstoD()
Sends the exchange to the given dynamic endpointSends the exchange to the given dynamic endpointSends the exchange to the given dynamic endpointSends the exchange to the given dynamic endpointtoD
(EndpointProducerBuilder endpointProducerBuilder) Sends the exchange to the given dynamic endpointtoD
(EndpointProducerBuilder endpointProducerBuilder, boolean ignoreInvalidEndpoint) Sends the exchange to the given dynamic endpointtoD
(EndpointProducerBuilder endpointProducerBuilder, int cacheSize) Sends the exchange to the given dynamic endpointSends the exchange to the given endpointMarks this route as transacted and uses the default transacted policy found in the registry.transacted
(String ref) Marks this route as transacted.Message Translator EIP: Adds a processor which sets the body on the OUT messagetransform
(org.apache.camel.Expression expression) Message Translator EIP: Adds a processor which sets the body on the OUT messagetransform
(org.apache.camel.spi.DataType toType) Message Translator EIP: Adds a processor which sets the body on the OUT message according to a data type transformation.transform
(org.apache.camel.spi.DataType fromType, org.apache.camel.spi.DataType toType) Message Translator EIP: Adds a processor which sets the body on the OUT message according to a data type transformation.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.DataFormat: Unmarshals the in body using the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.DataFormat: Unmarshals the in body using the specifiedDataFormat
reference in theRegistry
and sets the output on the out message body.unmarshal
(DataFormatDefinition dataFormatType) DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.unmarshal
(DataFormatDefinition dataFormatType, boolean allowNullBody) DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.unmarshal
(org.apache.camel.spi.DataFormat dataFormat) DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.unmarshal
(org.apache.camel.spi.DataFormat dataFormat, boolean allowNullBody) DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.validate()
Creates a validation expression which only if it is true then the exchange is forwarded to the destination.validate
(org.apache.camel.Expression expression) Creates a validation expression which only if it is true then the exchange is forwarded to the destination.validate
(org.apache.camel.Predicate predicate) Creates a validation expression which only if it is true then the exchange is forwarded to the destination.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
.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
.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, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, hasCustomIdAssigned, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.NamedNode
getShortName
-
Field Details
-
disabled
-
inheritErrorHandler
-
-
Constructor Details
-
ProcessorDefinition
protected ProcessorDefinition()
-
-
Method Details
-
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
-
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
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
Strategy for children to do any custom configuration- Parameters:
output
- the child to be added as output to this
-
to
Sends the exchange to the given endpoint- Parameters:
uri
- the endpoint to send to- Returns:
- the builder
-
toD
Sends the exchange to the given dynamic endpoint- Returns:
- the builder
-
toD
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
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
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
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
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
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
Deprecated.Calls the service- Returns:
- the builder
-
serviceCall
Deprecated.Calls the service- Parameters:
name
- the service name- Returns:
- the builder
-
serviceCall
Deprecated.Calls the service- Parameters:
name
- the service nameuri
- the endpoint uri to use for calling the service- Returns:
- the builder
-
to
Sends the exchange to the given endpoint- Parameters:
endpoint
- the endpoint to send to- Returns:
- the builder
-
to
Sends the exchange to the given endpoint- Parameters:
endpoint
- the endpoint to send to- Returns:
- the builder
-
to
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
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
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
Sends the exchange to a list of endpoints- Parameters:
uris
- list of endpoints to send to- Returns:
- the builder
-
to
Sends the exchange to a list of endpoints- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
to
Sends the exchange to a list of endpoints- Parameters:
endpoints
- list of endpoints to send to- Returns:
- the builder
-
to
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
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
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
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
-
setExchangePattern
ExchangePattern: set theExchangePattern
into theExchange
. The pattern set on theExchange
will be changed from this point going foward.- Parameters:
exchangePattern
- the exchange pattern- Returns:
- the builder
-
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
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
Set the route group for this route.- Parameters:
group
- the route group- Returns:
- the builder
-
routeDescription
Set the route description for this route- Parameters:
description
- the route description- Returns:
- the builder
-
nodePrefixId
Sets a prefix to use for all node ids (not route id).- Parameters:
prefixId
- the prefix- Returns:
- the builder
-
disabled
Disables this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime. -
disabled
Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime. -
disabled
Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime. -
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
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
Routes the message to a sequence of processors which is grouped together as one logical name.- Returns:
- the builder
-
step
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
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
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
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
Continues processing theExchange
using asynchronous routing engine.- Returns:
- the builder
-
threads
Continues processing theExchange
using asynchronous routing engine.- Parameters:
poolSize
- the core pool size- Returns:
- the builder
-
threads
Continues processing theExchange
using asynchronous routing engine.- Parameters:
poolSize
- the core pool sizemaxPoolSize
- the maximum pool size- Returns:
- the builder
-
threads
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
Ends the current block- Returns:
- the builder
-
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
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
-
endDoTry
Ends the current block and returns back to thedoTry()
DSL.- Returns:
- the builder
-
endDoCatch
Ends the current block and returns back to thedoCatch()
DSL.- Returns:
- the builder
-
endCircuitBreaker
Ends the current block and returns back to thecircuitBreaker()
DSL.- Returns:
- the builder
-
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
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
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
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
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
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
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
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
Creates a Circuit Breaker EIP. This requires having an implementation on the classpath such as camel-microprofile-fault-tolerance.- Returns:
- the builder
-
kamelet
Creates a Kamelet EIP. This requires having camel-kamelet on the classpath.- Returns:
- the builder
-
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
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
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
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
Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clause- Returns:
- the builder for a choice expression
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Throttler EIP: Creates a throttler using a fluent builder.- Returns:
- the builder
-
throttle
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
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
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
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
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
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
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
Sets the exception on theExchange
- Parameters:
exception
- the exception to throw- Returns:
- the builder
-
throwException
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
Marks the exchange for rollback only. Does not set any exception as opposed torollback()
methods.- Returns:
- the builder
- See Also:
-
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
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:
-
rollback
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:
-
wireTap
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
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
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
-
stop
Stops continue routing the currentExchange
and marks it as completed.- Returns:
- the builder
-
onException
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> exceptionType1, Class<? extends Throwable> exceptionType2) Exception clause for catching certain exceptions and handling them.- Parameters:
exceptionType1
- the first exception to catchexceptionType2
- the second exception to catch- Returns:
- the exception builder to configure
-
onException
public OnExceptionDefinition onException(Class<? extends Throwable> exceptionType1, Class<? extends Throwable> exceptionType2, Class<? extends Throwable> exceptionType3) Exception clause for catching certain exceptions and handling them.- Parameters:
exceptionType1
- the first exception to catchexceptionType2
- the second exception to catchexceptionType3
- the third exception to catch- Returns:
- the exception builder to configure
-
onException
@SafeVarargs public final 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
Apply aPolicy
. Policy can be used for transactional policies.- Parameters:
policy
- the policy to apply- Returns:
- the policy builder to configure
-
policy
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
Marks this route as transacted and uses the default transacted policy found in the registry.- Returns:
- the policy builder to configure
-
transacted
Marks this route as transacted.- Parameters:
ref
- reference to lookup a transacted policy in the registry- Returns:
- the policy builder to configure
-
saga
Marks this route as participating in a saga.- Returns:
- the saga definition
-
process
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
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
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
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
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
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 (if String then a reference to a bean, prefix with type: to specify FQN java class)method
- the method name to invoke on the bean (can be used to avoid ambiguity)- Returns:
- the builder
-
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 Stringmethod
- the method name to invoke on the bean (can be used to avoid ambiguity)- Returns:
- the builder
-
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 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
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
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
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
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
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
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
Message Translator EIP: Adds a processor which sets the body on the IN message- Returns:
- a expression builder clause to set the body
-
setBody
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
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
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
Message Translator EIP: Adds a processor which sets the body on the OUT message according to a data type transformation.- Parameters:
fromType
- the data type representing the input of the transformationtoType
- the data type representing the output of the transformation.- Returns:
- the builder
-
transform
Message Translator EIP: Adds a processor which sets the body on the OUT message according to a data type transformation.- Parameters:
toType
- the data type representing the output of the transformation.- Returns:
- the builder
-
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
Executes a script (do not change the message body).- Parameters:
expression
- the expression used as the script.- Returns:
- the builder
-
script
Executes a script (do not change the message body).- Returns:
- a expression builder clause to use as script.
-
setHeader
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
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
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
Adds a processor which sets the exchange property- Parameters:
name
- the property nameexpression
- the expression used to set the property- Returns:
- the builder
-
setProperty
Adds a processor which sets the exchange property- Parameters:
name
- the property namesupplier
- the supplier used to set the property- Returns:
- the builder
-
setProperty
Adds a processor which sets the exchange property- Parameters:
name
- the property name- Returns:
- a expression builder clause to set the property
-
removeHeader
Adds a processor which removes the header on the IN message- Parameters:
name
- the header name- Returns:
- the builder
-
removeHeaders
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
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
Adds a processor which removes the exchange property- Parameters:
name
- the property name- Returns:
- the builder
-
removeProperties
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
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
Converts the IN message body to the specified type- Parameters:
type
- the type to convert to- Returns:
- the builder
-
convertBodyTo
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
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
Sorts the expression using a default sorting based on toString representation.- Parameters:
expression
- the expression, must be convertable toList
- Returns:
- the builder
-
sort
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
Sorts the expression- Returns:
- the builder
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormatType
- the dataformatallowNullBody
-true
ifnull
is allowed as value of a body to unmarshall,false
otherwise- Returns:
- the builder
-
unmarshal
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
DataFormat: Unmarshals the in body using the specifiedDataFormat
and sets the output on the out message body.- Parameters:
dataFormat
- the dataformatallowNullBody
-true
ifnull
is allowed as value of a body to unmarshall,false
otherwise- Returns:
- the builder
-
unmarshal
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
-
unmarshal
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
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
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
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
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
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
-
resumable
This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.- Returns:
- the builder
-
resumable
This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.- Parameters:
resumeStrategy
- the resume strategy- Returns:
- the builder
-
resumable
This defines the route as resumable, which allows the route to work with the endpoints and components to manage the state of consumers and resume upon restart.- Parameters:
resumeStrategy
- the resume strategy- Returns:
- the builder
-
pausable
This enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operation- Returns:
- the builder
-
pausable
public Type pausable(org.apache.camel.resume.ConsumerListener consumerListener, Predicate<?> untilCheck) This enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operation- Parameters:
consumerListener
- the consumer listener to use for consumer events- Returns:
- the builder
-
pausable
This enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operation- Parameters:
consumerListenerRef
- the resume strategy- Returns:
- the builder
-
pausable
This enables pausable consumers, which allows the consumer to pause work until a certain condition allows it to resume operation- Parameters:
consumerListenerRef
- the resume strategy- Returns:
- the builder
-
getParent
- Specified by:
getParent
in interfaceorg.apache.camel.NamedNode
- Overrides:
getParent
in classOptionalIdentifiedDefinition<Type extends ProcessorDefinition<Type>>
-
setParent
-
getRouteConfiguration
-
setRouteConfiguration
-
getInterceptStrategies
-
addInterceptStrategy
public void addInterceptStrategy(org.apache.camel.spi.InterceptStrategy strategy) -
isInheritErrorHandler
-
setInheritErrorHandler
-
getDisabled
-
setDisabled
-
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
-