Class ProcessorDefinition<Type extends ProcessorDefinition<Type>>

    • Field Detail

      • inheritErrorHandler

        protected Boolean inheritErrorHandler
    • Constructor Detail

      • ProcessorDefinition

        protected ProcessorDefinition()
    • Method Detail

      • getIndex

        public int getIndex()
        Gets the unique index number for when this ProcessorDefinition 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
      • 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 the addOutput(ProcessorDefinition) method.

      • isAbstract

        public boolean isAbstract()
        Whether this model is abstract or not.

        An abstract model is something that is used for configuring cross cutting concerns such as error handling, transaction policies, interceptors etc.

        Regular definitions is what is part of the route, such as ToDefinition, WireTapDefinition and the likes.

        Will by default return false to indicate regular definition, so all the abstract definitions must override this method and return true instead.

        This information is used in camel-spring to let Camel work a bit on the model provided by JAXB from the Spring XML file. This is needed to handle those cross cutting concerns properly. The Java DSL does not have this issue as it can work this out directly using the fluent builder methods.

        Returns:
        true for abstract, otherwise false for regular.
      • isWrappingEntireOutput

        public boolean isWrappingEntireOutput()
        Whether this definition is wrapping the entire output.

        When a definition is wrapping the entire output, the check to ensure that a route definition is empty should be done on the wrapped output.

        Returns:
        true when wrapping the entire output.
      • addOutput

        public void addOutput​(ProcessorDefinition<?> output)
        Description copied from interface: Block
        Adds the given definition as output to this block
        Specified by:
        addOutput in interface Block
        Parameters:
        output - the processor definition
      • clearOutput

        public void clearOutput()
      • preCreateProcessor

        public void preCreateProcessor()
        Strategy to execute any custom logic before the Processor is created.
      • configureChild

        public void configureChild​(ProcessorDefinition<?> output)
        Strategy for children to do any custom configuration
        Parameters:
        output - the child to be added as output to this
      • to

        public Type to​(@AsEndpointUri
                       String uri)
        Sends the exchange to the given endpoint
        Parameters:
        uri - the endpoint to send to
        Returns:
        the builder
      • toD

        public ToDynamicDefinition toD()
        Sends the exchange to the given dynamic endpoint
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        String uri)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        uri - the dynamic endpoint to send to (resolved using simple language by default)
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        EndpointProducerBuilder endpointProducerBuilder)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        endpointProducerBuilder - the dynamic endpoint to send to (resolved using simple language by default)
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        String uri,
                        int cacheSize)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        uri - the dynamic endpoint to send to (resolved using simple language by default)
        cacheSize - sets the maximum size used by the ProducerCache which is used to cache and reuse producers.
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        EndpointProducerBuilder endpointProducerBuilder,
                        int cacheSize)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        endpointProducerBuilder - the dynamic endpoint to send to (resolved using simple language by default)
        cacheSize - sets the maximum size used by the ProducerCache which is used to cache and reuse producers.
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        String uri,
                        boolean ignoreInvalidEndpoint)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        uri - the dynamic endpoint to send to (resolved using simple language by default)
        ignoreInvalidEndpoint - ignore the invalidate endpoint exception when try to create a producer with that endpoint
        Returns:
        the builder
      • toD

        public Type toD​(@AsEndpointUri
                        EndpointProducerBuilder endpointProducerBuilder,
                        boolean ignoreInvalidEndpoint)
        Sends the exchange to the given dynamic endpoint
        Parameters:
        endpointProducerBuilder - the dynamic endpoint to send to (resolved using simple language by default)
        ignoreInvalidEndpoint - ignore the invalidate endpoint exception when try to create a producer with that endpoint
        Returns:
        the builder
      • toF

        public Type toF​(@AsEndpointUri
                        String uri,
                        Object... args)
        Sends the exchange to the given endpoint
        Parameters:
        uri - the String formatted endpoint uri to send to
        args - arguments for the string formatting of the uri
        Returns:
        the builder
      • serviceCall

        public Type serviceCall​(String name)
        Calls the service
        Parameters:
        name - the service name
        Returns:
        the builder
      • serviceCall

        public Type serviceCall​(String name,
                                @AsEndpointUri
                                String uri)
        Calls the service
        Parameters:
        name - the service name
        uri - the endpoint uri to use for calling the service
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.Endpoint endpoint)
        Sends the exchange to the given endpoint
        Parameters:
        endpoint - the endpoint to send to
        Returns:
        the builder
      • to

        public Type to​(@AsEndpointUri
                       EndpointProducerBuilder endpoint)
        Sends the exchange to the given endpoint
        Parameters:
        endpoint - the endpoint to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.ExchangePattern pattern,
                       @AsEndpointUri
                       String uri)
        Sends the exchange with certain exchange pattern to the given endpoint

        Notice the existing MEP is preserved

        Parameters:
        pattern - the pattern to use for the message exchange
        uri - the endpoint to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.ExchangePattern pattern,
                       org.apache.camel.Endpoint endpoint)
        Sends the exchange with certain exchange pattern to the given endpoint

        Notice the existing MEP is preserved

        Parameters:
        pattern - the pattern to use for the message exchange
        endpoint - the endpoint to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.ExchangePattern pattern,
                       EndpointProducerBuilder endpoint)
        Sends the exchange with certain exchange pattern to the given endpoint

        Notice the existing MEP is preserved

        Parameters:
        pattern - the pattern to use for the message exchange
        endpoint - the endpoint to send to
        Returns:
        the builder
      • to

        public Type to​(@AsEndpointUri
                       String... uris)
        Sends the exchange to a list of endpoints
        Parameters:
        uris - list of endpoints to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.Endpoint... endpoints)
        Sends the exchange to a list of endpoints
        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • to

        @Deprecated
        public Type to​(Iterable<org.apache.camel.Endpoint> endpoints)
        Deprecated.
        Sends the exchange to a list of endpoints
        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • to

        public Type to​(@AsEndpointUri
                       EndpointProducerBuilder... endpoints)
        Sends the exchange to a list of endpoints
        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.ExchangePattern pattern,
                       @AsEndpointUri
                       String... uris)
        Sends the exchange to a list of endpoints

        Notice the existing MEP is preserved

        Parameters:
        pattern - the pattern to use for the message exchanges
        uris - list of endpoints to send to
        Returns:
        the builder
      • to

        public Type to​(org.apache.camel.ExchangePattern pattern,
                       org.apache.camel.Endpoint... endpoints)
        Sends the exchange to a list of endpoints

        Notice the existing MEP is preserved

        Parameters:
        pattern - the pattern to use for the message exchanges
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • to

        @Deprecated
        public Type to​(org.apache.camel.ExchangePattern pattern,
                       Iterable<org.apache.camel.Endpoint> endpoints)
        Deprecated.
        Sends the exchange to a list of endpoints
        Parameters:
        pattern - the pattern to use for the message exchanges
        endpoints - 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 exchanges
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • setExchangePattern

        public Type setExchangePattern​(org.apache.camel.ExchangePattern exchangePattern)
        ExchangePattern: set the ExchangePattern into the Exchange.

        The pattern set on the Exchange will be changed from this point going foward.

        Parameters:
        exchangePattern - instance of ExchangePattern
        Returns:
        the builder
      • inOnly

        @Deprecated
        public Type inOnly​(@AsEndpointUri
                           String uri)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoint using an Event Message or InOnly exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        uri - The endpoint uri which is used for sending the exchange
        Returns:
        the builder
      • inOnly

        @Deprecated
        public Type inOnly​(org.apache.camel.Endpoint endpoint)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoint using an Event Message or InOnly exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoint - The endpoint which is used for sending the exchange
        Returns:
        the builder
      • inOnly

        @Deprecated
        public Type inOnly​(@AsEndpointUri
                           String... uris)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Event Message or InOnly exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        uris - list of endpoints to send to
        Returns:
        the builder
      • inOnly

        @Deprecated
        public Type inOnly​(@AsEndpointUri
                           org.apache.camel.Endpoint... endpoints)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Event Message or InOnly exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • inOnly

        @Deprecated
        public Type inOnly​(Iterable<org.apache.camel.Endpoint> endpoints)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Event Message or InOnly exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • inOut

        @Deprecated
        public Type inOut​(@AsEndpointUri
                          String uri)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoint using an Request Reply or InOut exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        uri - The endpoint uri which is used for sending the exchange
        Returns:
        the builder
      • inOut

        @Deprecated
        public Type inOut​(org.apache.camel.Endpoint endpoint)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoint using an Request Reply or InOut exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoint - The endpoint which is used for sending the exchange
        Returns:
        the builder
      • inOut

        @Deprecated
        public Type inOut​(@AsEndpointUri
                          String... uris)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Request Reply or InOut exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        uris - list of endpoints to send to
        Returns:
        the builder
      • inOut

        @Deprecated
        public Type inOut​(org.apache.camel.Endpoint... endpoints)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Request Reply or InOut exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • inOut

        @Deprecated
        public Type inOut​(Iterable<org.apache.camel.Endpoint> endpoints)
        Deprecated.
        use to where you can specify the exchange pattern as well
        Sends the message to the given endpoints using an Request Reply or InOut exchange pattern

        Notice the existing MEP is restored after the message has been sent to the given endpoint.

        Parameters:
        endpoints - list of endpoints to send to
        Returns:
        the builder
      • routeId

        public Type routeId​(String id)
        Set the route id for this route.

        Important: Each route in the same CamelContext must have an unique route id. If you use the API from CamelContext or ModelCamelContext to add routes, then any new routes which has a route id that matches an old route, then the old route is replaced by the new route.

        Parameters:
        id - the route id, should be unique
        Returns:
        the builder
      • routeGroup

        public Type routeGroup​(String group)
        Set the route group for this route.
        Parameters:
        group - the route group
        Returns:
        the builder
      • routeDescription

        public Type routeDescription​(String description)
        Set the route description for this route
        Parameters:
        description - the route description
        Returns:
        the builder
      • multicast

        public MulticastDefinition multicast()
        Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
        Returns:
        the builder
      • multicast

        public MulticastDefinition multicast​(org.apache.camel.AggregationStrategy aggregationStrategy,
                                             boolean parallelProcessing)
        Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
        Parameters:
        aggregationStrategy - the strategy used to aggregate responses for every part
        parallelProcessing - if is true camel will fork thread to call the endpoint producer
        Returns:
        the builder
      • multicast

        public MulticastDefinition multicast​(org.apache.camel.AggregationStrategy aggregationStrategy)
        Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
        Parameters:
        aggregationStrategy - the strategy used to aggregate responses for every part
        Returns:
        the builder
      • step

        public StepDefinition step()
        Routes the message to a sequence of processors which is grouped together as one logical name.
        Returns:
        the builder
      • step

        public StepDefinition step​(String id)
        Routes the message to a sequence of processors which is grouped together as one logical name.
        Parameters:
        id - unique id of the step within the camel context
        Returns:
        the builder
      • pipeline

        public PipelineDefinition pipeline()
        Pipes and Filters EIP: Creates a Pipeline so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint
        Returns:
        the builder
      • pipeline

        public Type pipeline​(@AsEndpointUri
                             String... uris)
        Pipes and Filters EIP: Creates a Pipeline of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint
        Parameters:
        uris - list of endpoints
        Returns:
        the builder
      • pipeline

        public Type pipeline​(org.apache.camel.Endpoint... endpoints)
        Pipes and Filters EIP: Creates a Pipeline of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint
        Parameters:
        endpoints - list of endpoints
        Returns:
        the builder
      • pipeline

        @Deprecated
        public Type pipeline​(Collection<org.apache.camel.Endpoint> endpoints)
        Deprecated.
        Pipes and Filters EIP: Creates a Pipeline of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint
        Parameters:
        endpoints - list of endpoints
        Returns:
        the builder
      • threads

        public ThreadsDefinition threads()
        Continues processing the Exchange using asynchronous routing engine.
        Returns:
        the builder
      • threads

        public ThreadsDefinition threads​(int poolSize)
        Continues processing the Exchange using asynchronous routing engine.
        Parameters:
        poolSize - the core pool size
        Returns:
        the builder
      • threads

        public ThreadsDefinition threads​(int poolSize,
                                         int maxPoolSize)
        Continues processing the Exchange using asynchronous routing engine.
        Parameters:
        poolSize - the core pool size
        maxPoolSize - the maximum pool size
        Returns:
        the builder
      • threads

        public ThreadsDefinition threads​(int poolSize,
                                         int maxPoolSize,
                                         String threadName)
        Continues processing the Exchange using asynchronous routing engine.
        Parameters:
        poolSize - the core pool size
        maxPoolSize - the maximum pool size
        threadName - the thread pool name
        Returns:
        the builder
      • endChoice

        public ChoiceDefinition endChoice()
        Ends the current block and returns back to the choice() DSL.

        Important: If you want to end the entire choice block, then use end() instead. The purpose of endChoice() is to return control back to the choice() DSL, so you can add subsequent when and otherwise to the choice. There can be situations where you would need to use endChoice() often when you add additional EIPs inside the when's, and the DSL looses scope when using a regular end(), and you would need to use this endChoice() to return back the scope to the choice() 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

        public TryDefinition endDoTry()
        Ends the current block and returns back to the doTry() DSL.
        Returns:
        the builder
      • endDoCatch

        public CatchDefinition endDoCatch()
        Ends the current block and returns back to the doCatch() DSL.
        Returns:
        the builder
      • idempotentConsumer

        public IdempotentConsumerDefinition idempotentConsumer​(org.apache.camel.Expression messageIdExpression)
        Idempotent consumer EIP: Creates an IdempotentConsumer 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 an IdempotentConsumer to avoid duplicate messages
        Parameters:
        messageIdExpression - expression to test of duplicate messages
        idempotentRepository - the repository to use for duplicate check
        Returns:
        the builder
      • filter

        @AsPredicate
        public ExpressionClause<? extends FilterDefinition> filter()
        Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destination
        Returns:
        the clause used to create the filter expression
      • filter

        public FilterDefinition filter​(@AsPredicate
                                       org.apache.camel.Predicate predicate)
        Message Filter EIP: Creates a predicate which is applied and only if it is true then the exchange is forwarded to the destination
        Parameters:
        predicate - predicate to use
        Returns:
        the builder
      • filter

        public FilterDefinition filter​(@AsPredicate
                                       ExpressionDefinition expression)
        Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destination
        Parameters:
        expression - the predicate expression to use
        Returns:
        the builder
      • filter

        public FilterDefinition filter​(String language,
                                       @AsPredicate
                                       String expression)
        Message Filter EIP: Creates a predicate language expression which only if it is true then the exchange is forwarded to the destination
        Parameters:
        language - language for expression
        expression - the expression
        Returns:
        the builder
      • validate

        public ValidateDefinition validate​(@AsPredicate
                                           org.apache.camel.Expression expression)
        Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise a PredicateValidationException is thrown.
        Parameters:
        expression - the expression
        Returns:
        the builder
      • validate

        public ValidateDefinition validate​(@AsPredicate
                                           org.apache.camel.Predicate predicate)
        Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise a PredicateValidationException is thrown.
        Parameters:
        predicate - the predicate
        Returns:
        the builder
      • validate

        @AsPredicate
        public ExpressionClause<ValidateDefinition> validate()
        Creates a validation expression which only if it is true then the exchange is forwarded to the destination. Otherwise a PredicateValidationException is thrown.
        Returns:
        the builder
      • circuitBreaker

        public CircuitBreakerDefinition circuitBreaker()
        Creates a Circuit Breaker EIP.

        This requires having an implementation on the classpath such as camel-microprofile-fault-tolerance.

        Returns:
        the builder
      • kamelet

        public KameletDefinition kamelet​(String name)
        Creates a Kamelet EIP.

        This requires having camel-kamelet on the classpath.

        Returns:
        the builder
      • loadBalance

        public LoadBalanceDefinition loadBalance​(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
        Load Balancer EIP: Creates a loadbalance
        Parameters:
        loadBalancer - a custom load balancer to use
        Returns:
        the builder
      • log

        public Type log​(String message)
        Creates a log message to be logged at INFO level.
        Parameters:
        message - the log message (you can use simple language syntax)
        Returns:
        the builder
      • log

        public Type log​(org.apache.camel.LoggingLevel loggingLevel,
                        String message)
        Creates a log message to be logged at the given level.
        Parameters:
        loggingLevel - the logging level to use
        message - the log message (you can use simple language syntax)
        Returns:
        the builder
      • log

        public Type log​(org.apache.camel.LoggingLevel loggingLevel,
                        String logName,
                        String message)
        Creates a log message to be logged at the given level and name.
        Parameters:
        loggingLevel - the logging level to use
        logName - the log name to use
        message - 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 use
        logger - the logger to use
        message - 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 use
        logName - the log name to use
        marker - log marker name
        message - 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 use
        logger - the logger to use
        marker - log marker name
        message - the log message (you can use simple language syntax)
        Returns:
        the builder
      • doTry

        public TryDefinition doTry()
        Creates a try/catch block
        Returns:
        the builder for a tryBlock expression
      • recipientList

        public RecipientListDefinition<Type> recipientList​(@AsEndpointUri
                                                           org.apache.camel.Expression recipients)
        Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients.

        Will use comma as default delimiter.

        Parameters:
        recipients - expression to decide the destinations
        Returns:
        the builder
      • recipientList

        public RecipientListDefinition<Type> recipientList​(@AsEndpointUri
                                                           org.apache.camel.Expression recipients,
                                                           String delimiter)
        Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
        Parameters:
        recipients - expression to decide the destinations
        delimiter - a custom delimiter to use
        Returns:
        the builder
      • recipientList

        @AsEndpointUri
        public ExpressionClause<RecipientListDefinition<Type>> recipientList()
        Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
        Returns:
        the expression clause to configure the expression to decide the destinations
      • routingSlip

        public RoutingSlipDefinition<Type> routingSlip​(@AsEndpointUri
                                                       org.apache.camel.Expression expression,
                                                       String uriDelimiter)
        Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.

        The route slip will be evaluated once, use dynamicRouter() if you need even more dynamic routing.

        Parameters:
        expression - to decide the destinations
        uriDelimiter - 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 delimiter RoutingSlipDefinition.DEFAULT_DELIMITER

        The route slip will be evaluated once, use dynamicRouter() if you need even more dynamic routing.

        Parameters:
        expression - to decide the destinations
        Returns:
        the builder
      • routingSlip

        public ExpressionClause<RoutingSlipDefinition<Type>> routingSlip()
        Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.

        The list of URIs will be split based on the default delimiter RoutingSlipDefinition.DEFAULT_DELIMITER

        The route slip will be evaluated once, use dynamicRouter() if you need even more dynamic routing.

        Returns:
        the expression clause to configure the expression to decide the destinations
      • dynamicRouter

        public DynamicRouterDefinition<Type> dynamicRouter​(@AsEndpointUri
                                                           org.apache.camel.Expression expression)
        Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.


        Important: The expression will be invoked repeatedly until it returns null, so be sure it does that, otherwise it will be invoked endlessly.

        Parameters:
        expression - to decide the destinations, which will be invoked repeatedly until it evaluates null to indicate no more destinations.
        Returns:
        the builder
      • dynamicRouter

        @AsEndpointUri
        public ExpressionClause<DynamicRouterDefinition<Type>> dynamicRouter()
        Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.


        Important: The expression will be invoked repeatedly until it returns null, so be sure it does that, otherwise it will be invoked endlessly.

        Returns:
        the expression clause to configure the expression to decide the destinations, which will be invoked repeatedly until it evaluates null to indicate no more destinations.
      • sample

        public SamplingDefinition sample()
        Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic on a route. It is configured with a sampling period, during which only a single exchange is allowed to pass through. All other exchanges will be stopped.

        Default period is one second.

        Returns:
        the builder
      • sample

        public SamplingDefinition sample​(Duration samplePeriod)
        Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during which only a single exchange is allowed to pass through. All other exchanges will be stopped.
        Parameters:
        samplePeriod - this is the sample interval, only one exchange is allowed through in this interval
        Returns:
        the builder
      • sample

        public SamplingDefinition sample​(String samplePeriod)
        Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during which only a single exchange is allowed to pass through. All other exchanges will be stopped.
        Parameters:
        samplePeriod - this is the sample interval, only one exchange is allowed through in this interval
        Returns:
        the builder
      • sample

        @Deprecated
        public SamplingDefinition sample​(long samplePeriod,
                                         TimeUnit unit)
        Deprecated.
        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
        unit - this is the units for the samplePeriod e.g. Seconds
        Returns:
        the builder
      • sample

        public SamplingDefinition sample​(long messageFrequency)
        Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling message frequency during which only a single exchange is allowed to pass through. All other exchanges will be stopped.
        Parameters:
        messageFrequency - this is the sample message frequency, only one exchange is allowed through for this many messages received
        Returns:
        the builder
      • split

        public ExpressionClause<SplitDefinition> split()
        Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.

        This splitter responds with the original input message. You can use a custom AggregationStrategy to control what to respond from the splitter.

        Returns:
        the expression clause builder for the expression on which to split
      • split

        public SplitDefinition split​(org.apache.camel.Expression expression)
        Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.

        This splitter responds with the original input message. You can use a custom AggregationStrategy to control what to respond from the splitter.

        Parameters:
        expression - the expression on which to split the message
        Returns:
        the builder
      • split

        public SplitDefinition split​(org.apache.camel.Expression expression,
                                     String delimiter)
        Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.

        This splitter responds with the original input message. You can use a custom AggregationStrategy to control what to respond from the splitter.

        Parameters:
        expression - the expression on which to split the message
        delimiter - 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 split
        aggregationStrategy - the strategy used to aggregate responses for every part
        Returns:
        the builder
      • resequence

        public ExpressionClause<ResequenceDefinition> resequence()
        Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.
        Returns:
        the expression clause for the expressions on which to compare messages in order
      • resequence

        public ResequenceDefinition resequence​(org.apache.camel.Expression expression)
        Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.
        Parameters:
        expression - the expression on which to compare messages in order
        Returns:
        the builder
      • aggregate

        public ExpressionClause<AggregateDefinition> aggregate()
        Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
        Returns:
        the expression clause to be used as builder to configure the correlation expression
      • aggregate

        public ExpressionClause<AggregateDefinition> aggregate​(org.apache.camel.AggregationStrategy aggregationStrategy)
        Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
        Parameters:
        aggregationStrategy - the strategy used for the aggregation
        Returns:
        the expression clause to be used as builder to configure the correlation expression
      • aggregate

        public AggregateDefinition aggregate​(org.apache.camel.Expression correlationExpression)
        Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
        Parameters:
        correlationExpression - the expression used to calculate the correlation key. For a JMS message this could be the expression header("JMSDestination") or header("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 expression header("JMSDestination") or header("JMSCorrelationID")
        aggregationStrategy - the strategy used for the aggregation
        Returns:
        the builder
      • delay

        public DelayDefinition delay​(org.apache.camel.Expression delay)
        Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
        Parameters:
        delay - an expression to calculate the delay time in millis
        Returns:
        the builder
      • delay

        public DelayDefinition delay​(long delay)
        Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
        Parameters:
        delay - the delay in millis
        Returns:
        the builder
      • throttle

        public ThrottleDefinition throttle​(long maximumRequestCount)
        Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.

        Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.

        Parameters:
        maximumRequestCount - the maximum messages
        Returns:
        the builder
      • throttle

        public ThrottleDefinition throttle​(org.apache.camel.Expression maximumRequestCount)
        Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.

        Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.

        Parameters:
        maximumRequestCount - an expression to calculate the maximum request count
        Returns:
        the builder
      • throttle

        public ThrottleDefinition throttle​(org.apache.camel.Expression maximumRequestCount,
                                           long correlationExpressionKey)
        Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service. Here another parameter correlationExpressionKey is introduced for the functionality which will throttle based on the key expression to group exchanges. This will make key-based throttling instead of overall throttling.

        Will default use a time period of 1 second, so setting the maximumRequestCount to eg 10 will default ensure at most 10 messages per second.

        Parameters:
        maximumRequestCount - an expression to calculate the maximum request count
        correlationExpressionKey - 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 count
        correlationExpressionKey - is a correlation key as an expression that can throttle by the given key instead of overall throttling
        Returns:
        the builder
      • loop

        public ExpressionClause<LoopDefinition> loop()
        Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way. Useful mostly for testing.
        Returns:
        the clause used to create the loop expression
      • loop

        public LoopDefinition loop​(org.apache.camel.Expression expression)
        Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.
        Parameters:
        expression - the loop expression
        Returns:
        the builder
      • loopDoWhile

        public LoopDefinition loopDoWhile​(@AsPredicate
                                          org.apache.camel.Predicate predicate)
        Loop EIP: Creates a while loop allowing to process the a message while the predicate matches and possibly process them in a different way.
        Parameters:
        predicate - the while loop predicate
        Returns:
        the builder
      • loopDoWhile

        public ExpressionClause<LoopDefinition> loopDoWhile()
        Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way using a fluent builder.
        Returns:
        the builder
      • loop

        public LoopDefinition loop​(int count)
        Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.
        Parameters:
        count - the number of times
        Returns:
        the builder
      • throwException

        public Type throwException​(Exception exception)
        Sets the exception on the Exchange
        Parameters:
        exception - the exception to throw
        Returns:
        the builder
      • throwException

        public Type throwException​(Class<? extends Exception> type,
                                   String message)
        Sets the exception on the Exchange
        Parameters:
        type - the exception class to use
        message - the given message as caused message (supports simple language)
        Returns:
        the builder
      • markRollbackOnlyLast

        public Type markRollbackOnlyLast()
        Marks the exchange for rollback only, but only for the last (current) transaction.

        A last rollback is used when you have nested transactions and only want the last local transaction to rollback, where as the outer transaction can still be completed

        Does not set any exception as opposed to rollback() methods.

        Returns:
        the builder
        See Also:
        rollback(), rollback(String), markRollbackOnly()
      • rollback

        public Type rollback()
        Marks the exchange for rollback only and sets an exception with a default message.

        This is done by setting a RollbackExchangeException on the Exchange and mark it for rollback.

        Returns:
        the builder
        See Also:
        markRollbackOnly()
      • rollback

        public Type rollback​(String message)
        Marks the exchange for rollback and sets an exception with the provided message.

        This is done by setting a RollbackExchangeException on the Exchange and mark it for rollback.

        Parameters:
        message - an optional message used for logging purpose why the rollback was triggered
        Returns:
        the builder
        See Also:
        markRollbackOnly()
      • wireTap

        public WireTapDefinition<Type> wireTap​(org.apache.camel.Endpoint endpoint)
        WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other using ExchangePattern.InOnly.
        Parameters:
        endpoint - the endpoint to wiretap to
        Returns:
        the builder
      • wireTap

        public WireTapDefinition<Type> wireTap​(@AsEndpointUri
                                               EndpointProducerBuilder endpoint)
        WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other using ExchangePattern.InOnly.
        Parameters:
        endpoint - the endpoint to wiretap to
        Returns:
        the builder
      • wireTap

        public WireTapDefinition<Type> wireTap​(@AsEndpointUri
                                               String uri)
        WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other using ExchangePattern.InOnly.
        Parameters:
        uri - the dynamic endpoint to wiretap to (resolved using simple language by default)
        Returns:
        the builder
      • startupOrder

        public Type startupOrder​(int startupOrder)
      • stop

        public Type stop()
        Stops continue routing the current Exchange and marks it as completed.
        Returns:
        the builder
      • onException

        public OnExceptionDefinition onException​(Class<? extends Throwable> exceptionType)
        Exception clause for catching certain exceptions and handling them.
        Parameters:
        exceptionType - the exception to catch
        Returns:
        the exception builder to configure
      • onException

        public OnExceptionDefinition onException​(Class<? extends Throwable>... exceptions)
        Exception clause for catching certain exceptions and handling them.
        Parameters:
        exceptions - list of exceptions to catch
        Returns:
        the exception builder to configure
      • policy

        public PolicyDefinition policy​(org.apache.camel.spi.Policy policy)
        Apply a Policy.

        Policy can be used for transactional policies.

        Parameters:
        policy - the policy to apply
        Returns:
        the policy builder to configure
      • policy

        public PolicyDefinition policy​(String ref)
        Apply a Policy.

        Policy can be used for transactional policies.

        Parameters:
        ref - reference to lookup a policy in the registry
        Returns:
        the policy builder to configure
      • transacted

        public TransactedDefinition transacted()
        Marks this route as transacted and uses the default transacted policy found in the registry.
        Returns:
        the policy builder to configure
      • transacted

        public TransactedDefinition transacted​(String ref)
        Marks this route as transacted.
        Parameters:
        ref - reference to lookup a transacted policy in the registry
        Returns:
        the policy builder to configure
      • saga

        public SagaDefinition saga()
        Marks this route as participating in a saga.
        Returns:
        the saga definition
      • process

        public Type process​(org.apache.camel.Processor processor)
        Message Translator EIP: Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        processor - the custom Processor
        Returns:
        the builder
      • process

        public Type process​(String ref)
        Message Translator EIP: Adds the custom processor reference to this destination which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        ref - reference to a Processor to lookup in the registry
        Returns:
        the builder
      • bean

        public Type bean​(Object bean)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        Returns:
        the builder
      • bean

        public Type bean​(Supplier<Object> bean)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        Returns:
        the builder
      • bean

        public Type bean​(Object bean,
                         String method)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        Returns:
        the builder
      • bean

        public Type bean​(Supplier<Object> bean,
                         String method)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        Returns:
        the builder
      • bean

        public Type bean​(Supplier<Object> bean,
                         String method,
                         org.apache.camel.BeanScope scope)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        scope - bean scope to use (singleton, request, prototype)
        Returns:
        the builder
      • bean

        public Type bean​(Object bean,
                         org.apache.camel.BeanScope scope)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        scope - bean scope to use (singleton, request, prototype)
        Returns:
        the builder
      • bean

        public Type bean​(Object bean,
                         String method,
                         org.apache.camel.BeanScope scope)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        bean - the bean to invoke, or a reference to a bean if the type is a String
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        scope - bean scope to use (singleton, request, prototype)
        Returns:
        the builder
      • bean

        public Type bean​(Class<?> beanType)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        beanType - the bean class, Camel will instantiate an object at runtime
        Returns:
        the builder
      • bean

        public Type bean​(Class<?> beanType,
                         org.apache.camel.BeanScope scope)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        beanType - the bean class, Camel will instantiate an object at runtime
        scope - bean scope to use (singleton, request, prototype)
        Returns:
        the builder
      • bean

        public Type bean​(Class<?> beanType,
                         String method)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        beanType - the bean class, Camel will instantiate an object at runtime
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        Returns:
        the builder
      • bean

        public Type bean​(Class<?> beanType,
                         String method,
                         org.apache.camel.BeanScope scope)
        Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
        Parameters:
        beanType - the bean class, Camel will instantiate an object at runtime
        method - the method name to invoke on the bean (can be used to avoid ambiguity)
        scope - bean scope to use (singleton, request, prototype)
        Returns:
        the builder
      • setBody

        public Type setBody​(org.apache.camel.Expression expression)
        Message Translator EIP: Adds a processor which sets the body on the IN message
        Parameters:
        expression - the expression used to set the body
        Returns:
        the builder
      • setBody

        public <Result> Type setBody​(Function<org.apache.camel.Exchange,​Result> function)
        Message Translator EIP: Adds a processor which sets the body on the IN message
        Parameters:
        function - the function that provides a value to the IN message body
        Returns:
        the builder
      • transform

        public Type transform​(org.apache.camel.Expression expression)
        Message Translator EIP: Adds a processor which sets the body on the OUT message
        Parameters:
        expression - the expression used to set the body
        Returns:
        the builder
      • script

        public Type script​(org.apache.camel.Expression expression)
        Executes a script (do not change the message body).
        Parameters:
        expression - the expression used as the script.
        Returns:
        the builder
      • setHeader

        public ExpressionClause<ProcessorDefinition<Type>> setHeader​(String name)
        Adds a processor which sets the header on the IN message
        Parameters:
        name - the header name
        Returns:
        a expression builder clause to set the header
      • setHeader

        public Type setHeader​(String name,
                              org.apache.camel.Expression expression)
        Adds a processor which sets the header on the IN message
        Parameters:
        name - the header name
        expression - the expression used to set the header
        Returns:
        the builder
      • setHeader

        public Type setHeader​(String name,
                              Supplier<Object> supplier)
        Adds a processor which sets the header on the IN message
        Parameters:
        name - the header name
        supplier - the supplier used to set the header
        Returns:
        the builder
      • setProperty

        public Type setProperty​(String name,
                                org.apache.camel.Expression expression)
        Adds a processor which sets the exchange property
        Parameters:
        name - the property name
        expression - the expression used to set the property
        Returns:
        the builder
      • setProperty

        public Type setProperty​(String name,
                                Supplier<Object> supplier)
        Adds a processor which sets the exchange property
        Parameters:
        name - the property name
        supplier - the supplier used to set the property
        Returns:
        the builder
      • setProperty

        public ExpressionClause<ProcessorDefinition<Type>> setProperty​(String name)
        Adds a processor which sets the exchange property
        Parameters:
        name - the property name
        Returns:
        a expression builder clause to set the property
      • removeHeader

        public Type removeHeader​(String name)
        Adds a processor which removes the header on the IN message
        Parameters:
        name - the header name
        Returns:
        the builder
      • removeHeaders

        public Type removeHeaders​(String pattern)
        Adds a processor which removes the headers on the IN message
        Parameters:
        pattern - a pattern to match header names to be removed
        Returns:
        the builder
      • removeHeaders

        public Type removeHeaders​(String pattern,
                                  String... excludePatterns)
        Adds a processor which removes the headers on the IN message
        Parameters:
        pattern - a pattern to match header names to be removed
        excludePatterns - one or more pattern of header names that should be excluded (= preserved)
        Returns:
        the builder
      • removeProperty

        public Type removeProperty​(String name)
        Adds a processor which removes the exchange property
        Parameters:
        name - the property name
        Returns:
        the builder
      • removeProperties

        public Type removeProperties​(String pattern)
        Adds a processor which removes the properties in the exchange
        Parameters:
        pattern - a pattern to match properties names to be removed
        Returns:
        the builder
      • removeProperties

        public Type removeProperties​(String pattern,
                                     String... excludePatterns)
        Adds a processor which removes the properties in the exchange
        Parameters:
        pattern - a pattern to match properties names to be removed
        excludePatterns - one or more pattern of properties names that should be excluded (= preserved)
        Returns:
        the builder
      • convertBodyTo

        public Type convertBodyTo​(Class<?> type)
        Converts the IN message body to the specified type
        Parameters:
        type - the type to convert to
        Returns:
        the builder
      • convertBodyTo

        public Type convertBodyTo​(Class<?> type,
                                  boolean mandatory)
        Converts the IN message body to the specified type
        Parameters:
        type - the type to convert to
        mandatory - whether to use mandatory type conversion or not
        Returns:
        the builder
      • convertBodyTo

        public Type convertBodyTo​(Class<?> type,
                                  String charset)
        Converts the IN message body to the specified type
        Parameters:
        type - the type to convert to
        charset - the charset to use by type converters (not all converters support specific charset)
        Returns:
        the builder
      • sort

        public Type sort​(org.apache.camel.Expression expression)
        Sorts the expression using a default sorting based on toString representation.
        Parameters:
        expression - the expression, must be convertable to List
        Returns:
        the builder
      • sort

        public <T> Type sort​(org.apache.camel.Expression expression,
                             Comparator<T> comparator)
        Sorts the expression using the given comparator
        Parameters:
        expression - the expression, must be convertable to List
        comparator - the comparator to use for sorting
        Returns:
        the builder
      • claimCheck

        public ClaimCheckDefinition claimCheck()
        The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.
      • claimCheck

        public Type claimCheck​(ClaimCheckOperation operation)
        The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.
        Parameters:
        operation - the claim check operation to use.
      • claimCheck

        public Type claimCheck​(ClaimCheckOperation operation,
                               String key)
        The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.
        Parameters:
        operation - the claim check operation to use.
        key - the unique key to use for the get and set operations, can be null for push/pop operations
      • claimCheck

        public Type claimCheck​(ClaimCheckOperation operation,
                               String key,
                               String filter)
        The Claim Check EIP allows you to replace message content with a claim check (a unique key), which can be used to retrieve the message content at a later time.
        Parameters:
        operation - the claim check operation to use.
        key - the unique key to use for the get and set operations, can be null for push/pop operations
        filter - describes what data to include/exclude when merging data back when using get or pop operations.
      • enrich

        public Type enrich​(@AsEndpointUri
                           String resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.

        The difference between this and pollEnrich(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 a 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:
        Enricher
      • enrich

        public Type enrich​(@AsEndpointUri
                           EndpointProducerBuilder resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.

        The difference between this and pollEnrich(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 a 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:
        Enricher
      • enrichWith

        public EnrichClause<ProcessorDefinition<Type>> enrichWith​(@AsEndpointUri
                                                                  String resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri 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,
                                                                  boolean shareUnitOfWork)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri 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 a resourceUri 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
      • 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 a resourceUri.
        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        aggregationStrategy - aggregation strategy to aggregate input data and additional data.
        aggregateOnException - whether to call AggregationStrategy.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 a resourceUri.
        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        aggregationStrategy - aggregation strategy to aggregate input data and additional data.
        aggregateOnException - whether to call AggregationStrategy.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 a resourceUri.
        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        aggregationStrategy - aggregation strategy to aggregate input data and additional data.
        aggregateOnException - whether to call AggregationStrategy.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 a resourceUri.
        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        aggregationStrategy - aggregation strategy to aggregate input data and additional data.
        aggregateOnException - whether to call AggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange) if an exception was thrown.
        shareUnitOfWork - whether to share unit of work
        Returns:
        the builder
        See Also:
        Enricher
      • enrich

        @AsEndpointUri
        public ExpressionClause<EnrichDefinition> enrich()
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.

        The difference between this and pollEnrich(String) is that this uses a producer to obtain the additional data, where as pollEnrich uses a polling consumer.

        Returns:
        a expression builder clause to set the expression to use for computing the endpoint to use
        See Also:
        PollEnricher
      • pollEnrich

        public Type pollEnrich​(@AsEndpointUri
                               String resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).

        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        timeout - timeout in millis to wait at most for data to be available.
        aggregationStrategyRef - Reference of aggregation strategy to aggregate input data and additional data.
        Returns:
        the builder
        See Also:
        PollEnricher
      • pollEnrich

        public Type pollEnrich​(EndpointConsumerBuilder resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).

        Parameters:
        resourceUri - URI of resource endpoint for obtaining additional data.
        timeout - timeout in millis to wait at most for data to be available.
        aggregationStrategyRef - Reference of aggregation strategy to aggregate input data and additional data.
        Returns:
        the builder
        See Also:
        PollEnricher
      • pollEnrichWith

        public EnrichClause<ProcessorDefinition<Type>> pollEnrichWith​(@AsEndpointUri
                                                                      String resourceUri)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri and with an aggregation strategy created using a fluent builder using a PollingConsumer 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 a resourceUri and with an aggregation strategy created using a fluent builder using a PollingConsumer 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 a resourceUri and with an aggregation strategy created using a fluent builder using a PollingConsumer 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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 call AggregationStrategy.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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 call AggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange) if an exception was thrown.
        Returns:
        the builder
        See Also:
        PollEnricher
      • pollEnrich

        public Type pollEnrich​(@AsEndpointUri
                               String resourceUri,
                               long timeout)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 call AggregationStrategy.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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 call AggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange) if an exception was thrown.
        Returns:
        the builder
        See Also:
        PollEnricher
      • pollEnrich

        public Type pollEnrich​(@AsEndpointUri
                               EndpointConsumerBuilder resourceUri,
                               long timeout)
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 from
        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 call AggregationStrategy.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 a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. 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 from
        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 call AggregationStrategy.aggregate(org.apache.camel.Exchange, org.apache.camel.Exchange) if an exception was thrown.
        Returns:
        the builder
        See Also:
        PollEnricher
      • pollEnrich

        @AsEndpointUri
        public ExpressionClause<PollEnrichDefinition> pollEnrich()
        The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.

        The difference between this and enrich(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 on PollingConsumer. If timeout is negative, we use receive. If timeout is 0 then we use receiveNoWait otherwise we use receive(timeout).

        Returns:
        a expression builder clause to set the expression to use for computing the endpoint to poll from
        See Also:
        PollEnricher
      • onCompletion

        public OnCompletionDefinition onCompletion()
        Adds a onCompletion Synchronization hook that invoke this route as a callback when the Exchange has finished being processed. The hook invoke callbacks for either onComplete or onFailure.

        Will by default always trigger when the Exchange 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 the Exchange with the key Exchange.EXCEPTION_CAUGHT.

        Returns:
        the builder
      • unmarshal

        public DataFormatClause<ProcessorDefinition<Type>> unmarshal()
        DataFormat: Unmarshals the in body using a DataFormat expression to define the format of the input message and the output will be set on the out message body.
        Returns:
        the expression to create the DataFormat
      • unmarshal

        public Type unmarshal​(DataFormatDefinition dataFormatType)
        DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormatType - the dataformat
        Returns:
        the builder
      • unmarshal

        public Type unmarshal​(DataFormatDefinition dataFormatType,
                              boolean allowNullBody)
        DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormatType - the dataformat
        allowNullBody - true if null is allowed as value of a body to unmarshall, false otherwise
        Returns:
        the builder
      • unmarshal

        public Type unmarshal​(org.apache.camel.spi.DataFormat dataFormat)
        DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormat - the dataformat
        Returns:
        the builder
      • unmarshal

        public Type unmarshal​(org.apache.camel.spi.DataFormat dataFormat,
                              boolean allowNullBody)
        DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormat - the dataformat
        allowNullBody - true if null is allowed as value of a body to unmarshall, false otherwise
        Returns:
        the builder
      • unmarshal

        public Type unmarshal​(String dataTypeRef)
        DataFormat: Unmarshals the in body using the specified DataFormat reference in the Registry and sets the output on the out message body.
        Parameters:
        dataTypeRef - reference to a DataFormat to lookup in the registry
        Returns:
        the builder
      • unmarshal

        public Type unmarshal​(String dataTypeRef,
                              boolean allowNullBody)
        DataFormat: Unmarshals the in body using the specified DataFormat reference in the Registry and sets the output on the out message body.
        Parameters:
        dataTypeRef - reference to a DataFormat to lookup in the registry
        Returns:
        the builder
      • marshal

        public DataFormatClause<ProcessorDefinition<Type>> marshal()
        DataFormat: Marshals the in body using a DataFormat expression to define the format of the output which will be added to the out body.
        Returns:
        the expression to create the DataFormat
      • marshal

        public Type marshal​(DataFormatDefinition dataFormatType)
        DataFormat: Marshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormatType - the dataformat
        Returns:
        the builder
      • marshal

        public Type marshal​(org.apache.camel.spi.DataFormat dataFormat)
        DataFormat: Marshals the in body using the specified DataFormat and sets the output on the out message body.
        Parameters:
        dataFormat - the dataformat
        Returns:
        the builder
      • marshal

        public Type marshal​(String dataTypeRef)
        DataFormat: Marshals the in body the specified DataFormat reference in the Registry and sets the output on the out message body.
        Parameters:
        dataTypeRef - reference to a DataFormat to lookup in the registry
        Returns:
        the builder
      • inheritErrorHandler

        public Type inheritErrorHandler​(boolean inheritErrorHandler)
        Sets whether or not to inherit the configured error handler.
        The default value is true.

        You can use this to disable using the inherited error handler for a given DSL such as a load balancer where you want to use a custom error handler strategy.

        Parameters:
        inheritErrorHandler - whether to not to inherit the error handler for this node
        Returns:
        the builder
      • resumable

        public ResumableDefinition 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

        public Type 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.
        Parameters:
        resumeStrategy - the resume strategy
        Returns:
        the builder
      • resumable

        public Type resumable​(String 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.
        Parameters:
        resumeStrategy - the resume strategy
        Returns:
        the builder
      • pausable

        public PausableDefinition 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

        public Type pausable​(String consumerListenerRef,
                             Predicate<?> untilCheck)
        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

        public Type pausable​(String consumerListenerRef,
                             String untilCheck)
        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
      • getInterceptStrategies

        public List<org.apache.camel.spi.InterceptStrategy> getInterceptStrategies()
      • addInterceptStrategy

        public void addInterceptStrategy​(org.apache.camel.spi.InterceptStrategy strategy)
      • isInheritErrorHandler

        public Boolean isInheritErrorHandler()
      • setInheritErrorHandler

        public void setInheritErrorHandler​(Boolean inheritErrorHandler)
      • getLabel

        public String getLabel()
        Returns a label to describe this node such as the expression if some kind of expression node
        Specified by:
        getLabel in interface org.apache.camel.NamedNode