org.apache.camel.model
Class ProcessorDefinition<Type extends ProcessorDefinition<Type>>

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition
      extended by org.apache.camel.model.ProcessorDefinition<Type>
All Implemented Interfaces:
Block
Direct Known Subclasses:
AggregateDefinition, CatchDefinition, ChoiceDefinition, ExpressionNode, LoadBalanceDefinition, NoOutputDefinition, OnCompletionDefinition, OnExceptionDefinition, OutputDefinition, ResequenceDefinition, RouteDefinition

public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>>
extends OptionalIdentifiedDefinition
implements Block

Base class for processor types that most XML types extend.

Version:

Field Summary
protected  ErrorHandlerBuilder errorHandlerBuilder
           
protected  String errorHandlerRef
           
protected  Boolean inheritErrorHandler
           
protected  org.slf4j.Logger log
           
 
Constructor Summary
ProcessorDefinition()
           
 
Method Summary
protected  void addInterceptStrategies(RouteContext routeContext, Channel channel, List<InterceptStrategy> strategies)
          Adds the given list of interceptors to the channel.
 void addInterceptStrategy(InterceptStrategy strategy)
           
 void addOutput(ProcessorDefinition output)
          Adds the given definition as output to this block
 void addRoutes(RouteContext routeContext, Collection<Route> routes)
           
 ExpressionClause<AggregateDefinition> aggregate()
          Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
 ExpressionClause<AggregateDefinition> aggregate(AggregationStrategy aggregationStrategy)
          Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
 AggregateDefinition aggregate(Expression correlationExpression)
          Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
 AggregateDefinition aggregate(Expression correlationExpression, AggregationStrategy aggregationStrategy)
          Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.
 AOPDefinition aop()
          Deprecated. to be removed in the near future. Instead you can use interceptors or processors to do AOP with Camel.
 Type attribute(QName name, Object value)
          Adds an optional attribute
 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
 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
 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
 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
 Type beanRef(String ref)
          Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline
 Type beanRef(String ref, 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
 ChoiceDefinition choice()
          Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clause
 void clearOutput()
           
protected  void configureChild(ProcessorDefinition output)
          Strategy for children to do any custom configuration
 Type convertBodyTo(Class type)
          Converts the IN message body to the specified type
 Type convertBodyTo(Class type, String charset)
          Converts the IN message body to the specified type
protected  Channel createChannel(RouteContext routeContext)
          Creates a new instance of the Channel.
 Processor createChildProcessor(RouteContext routeContext, boolean mandatory)
          Creates the child processor (outputs) from the current definition
protected  Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list)
          Creates a new instance of some kind of composite processor which defaults to using a Pipeline but derived classes could change the behaviour
protected  ErrorHandlerBuilder createErrorHandlerBuilder()
           
 Processor createOutputsProcessor(RouteContext routeContext)
          Prefer to use {#link #createChildProcessor}.
protected  Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorDefinition> outputs)
           
 Processor createProcessor(RouteContext routeContext)
          Override this in definition class and implement logic to create the processor based on the definition model.
 ExpressionClause<DelayDefinition> delay()
          Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
 DelayDefinition delay(Expression delay)
          Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
 DelayDefinition delay(long delay)
          Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
 TryDefinition doTry()
          Creates a try/catch block
 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.
 DynamicRouterDefinition<Type> dynamicRouter(Expression expression)
          Dynamic Router EIP: Creates a dynamic router allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.
 ProcessorDefinition end()
          Ends the current block
 ChoiceDefinition endChoice()
          Ends the current block and returns back to the choice() DSL.
 TryDefinition endDoTry()
          Ends the current block and returns back to the doTry() DSL.
 ProcessorDefinition endParent()
          Strategy to allow ProcessorDefinitions to have special logic when using end() in the DSL to return back to the intended parent.
 Type enrich(String resourceUri)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.
 Type enrich(String resourceUri, AggregationStrategy aggregationStrategy)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.
 Type enrichRef(String resourceRef, String aggregationStrategyRef)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri.
 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
 FilterDefinition filter(ExpressionDefinition expression)
          Message Filter EIP: Creates a predicate expression which only if it is true then the exchange is forwarded to the destination
 FilterDefinition filter(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
 FilterDefinition filter(String language, String expression)
          Message Filter EIP: Creates a predicate language expression which only if it is true then the exchange is forwarded to the destination
 ErrorHandlerBuilder getErrorHandlerBuilder()
           
 List<InterceptStrategy> getInterceptStrategies()
           
 String getLabel()
          Returns a label to describe this node such as the expression if some kind of expression node
 NodeFactory getNodeFactory()
           
 Map<QName,Object> getOtherAttributes()
           
abstract  List<ProcessorDefinition> getOutputs()
           
 ProcessorDefinition getParent()
           
 Type id(String id)
          Sets the id of this node
 IdempotentConsumerDefinition idempotentConsumer(Expression messageIdExpression)
          Idempotent consumer EIP: Creates an IdempotentConsumer to avoid duplicate messages
 IdempotentConsumerDefinition idempotentConsumer(Expression messageIdExpression, IdempotentRepository<?> idempotentRepository)
          Idempotent consumer EIP: Creates an IdempotentConsumer to avoid duplicate messages
 ExpressionClause<IdempotentConsumerDefinition> idempotentConsumer(IdempotentRepository<?> idempotentRepository)
          Deprecated. will be removed in Camel 3.0. Instead use any of the other methods
 Type inheritErrorHandler(boolean inheritErrorHandler)
          Sets whether or not to inherit the configured error handler.
 Type inOnly()
          Deprecated. use setExchangePattern(org.apache.camel.ExchangePattern) instead
 Type inOnly(Endpoint... endpoints)
          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.

 Type inOnly(Endpoint endpoint)
          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.

 Type inOnly(Iterable<Endpoint> endpoints)
          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.

 Type inOnly(String... uris)
          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.

 Type inOnly(String uri)
          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.

 Type inOut()
          Deprecated. use setExchangePattern(org.apache.camel.ExchangePattern) instead
 Type inOut(Endpoint... endpoints)
          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.

 Type inOut(Endpoint endpoint)
          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.

 Type inOut(Iterable<Endpoint> endpoints)
          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.

 Type inOut(String... uris)
          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.

 Type inOut(String uri)
          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.

 boolean isAbstract()
          Whether this model is abstract or not.
 Boolean isInheritErrorHandler()
           
abstract  boolean isOutputSupported()
           
 LoadBalanceDefinition loadBalance()
          Load Balancer EIP: Creates a loadbalance
 LoadBalanceDefinition loadBalance(LoadBalancer loadBalancer)
          Load Balancer EIP: Creates a loadbalance
 Type log(LoggingLevel loggingLevel, String message)
          Creates a log message to be logged at the given level.
 Type log(LoggingLevel loggingLevel, String logName, String message)
          Creates a log message to be logged at the given level and name.
 Type log(String message)
          Creates a log message to be logged at INFO level.
 ExpressionClause<LoopDefinition> loop()
          Loop EIP: Creates a loop allowing to process the a message a number of times and possibly process them in a different way.
 LoopDefinition loop(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.
 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.
protected  Processor makeProcessor(RouteContext routeContext)
          Creates the processor and wraps it in any necessary interceptors and error handlers
 Type markRollbackOnly()
          Marks the exchange for rollback only.
 Type markRollbackOnlyLast()
          Marks the exchange for rollback only, but only for the last (current) transaction.
 DataFormatClause<ProcessorDefinition<Type>> marshal()
          DataFormat: Marshals the in body using a DataFormat expression to define the format of the output which will be added to the out body.
 Type marshal(DataFormat dataFormat)
          DataFormat: Marshals the in body using the specified DataFormat and sets the output on the out message body.
 Type marshal(DataFormatDefinition dataFormatType)
          DataFormat: Marshals the in body using the specified DataFormat and sets the output on the out message body.
 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.
 MulticastDefinition multicast()
          Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
 MulticastDefinition multicast(AggregationStrategy aggregationStrategy)
          Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
 MulticastDefinition multicast(AggregationStrategy aggregationStrategy, boolean parallelProcessing)
          Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other.
 OnCompletionDefinition onCompletion()
          Adds a onComplection Synchronization hook that invoke this route as a callback when the Exchange has finished being processed.
 OnExceptionDefinition onException(Class... exceptions)
          Exception clause for catching certain exceptions and handling them.
 OnExceptionDefinition onException(Class exceptionType)
          Exception clause for catching certain exceptions and handling them.
 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
 Type pipeline(Collection<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
 Type pipeline(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
 Type pipeline(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
 Type placeholder(String option, String key)
          Adds a placeholder for the given option

Requires using the PropertiesComponent

 PolicyDefinition policy(Policy policy)
          Apply a Policy.
 PolicyDefinition policy(String ref)
          Apply a Policy.
 Type pollEnrich(String resourceUri)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.
 Type pollEnrich(String resourceUri, AggregationStrategy aggregationStrategy)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.
 Type pollEnrich(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.
 Type pollEnrich(String resourceUri, long timeout, AggregationStrategy aggregationStrategy)
          The Content Enricher EIP enriches an exchange with additional data obtained from a resourceUri using a PollingConsumer to poll the endpoint.
 Type pollEnrichRef(String resourceRef, 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.
 Type process(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
 Type processRef(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
 ExpressionClause<RecipientListDefinition<Type>> recipientList()
          Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
 RecipientListDefinition<Type> recipientList(Expression recipients)
          Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients.
 RecipientListDefinition<Type> recipientList(Expression recipients, String delimiter)
          Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
 Type removeFaultHeader(String name)
          Deprecated. will be removed in the near future. Instead use removeHeader(String)
 Type removeHeader(String name)
          Adds a processor which removes the header on the IN message
 Type removeHeaders(String pattern)
          Adds a processor which removes the headers on the IN message
 Type removeHeaders(String pattern, String... excludePatterns)
          Adds a processor which removes the headers on the IN message
 Type removeProperty(String name)
          Adds a processor which removes the exchange property
 ExpressionClause<ResequenceDefinition> resequence()
          Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.
 ResequenceDefinition resequence(Expression expression)
          Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.
protected  void resolveKnownConstantFields(ProcessorDefinition definition)
          Inspects the given processor definition and resolves known fields

This implementation will check all the getter/setter pairs on this instance and for all the values (which is a String type) will check if it refers to a known field (such as on Exchange).

protected  void resolvePropertyPlaceholders(RouteContext routeContext, ProcessorDefinition definition)
          Inspects the given processor definition and resolves any property placeholders from its properties.
 Type rollback()
          Marks the exchange for rollback only and sets an exception with a default message.
 Type rollback(String message)
          Marks the exchange for rollback and sets an exception with the provided message.
 Type routeId(String id)
          Set the route id for this route
 ExpressionClause<RoutingSlipDefinition<Type>> routingSlip()
          Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.
 RoutingSlipDefinition<Type> routingSlip(Expression expression)
          Routing Slip EIP: Creates a routing slip allowing you to route a message consecutively through a series of processing steps where the sequence of steps is not known at design time and can vary for each message.
 RoutingSlipDefinition<Type> routingSlip(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.
 Type routingSlip(String header)
          Deprecated. prefer to use routingSlip(org.apache.camel.Expression) instead
 Type routingSlip(String header, boolean ignoreInvalidEndpoints)
          Deprecated. prefer to use routingSlip() instead
 Type routingSlip(String header, String uriDelimiter)
          Deprecated. prefer to use routingSlip(org.apache.camel.Expression, String) instead
 Type routingSlip(String header, String uriDelimiter, boolean ignoreInvalidEndpoints)
          Deprecated. prefer to use routingSlip() instead
 SamplingDefinition sample()
          Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic on a route.
 SamplingDefinition sample(long messageFrequency)
          Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.
 SamplingDefinition sample(long samplePeriod, TimeUnit unit)
          Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route.
 ExpressionClause<ProcessorDefinition<Type>> setBody()
          Message Translator EIP: Adds a processor which sets the body on the IN message
 Type setBody(Expression expression)
          Message Translator EIP: Adds a processor which sets the body on the IN message
 void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
          Sets the error handler to use with processors created by this builder
 Type setExchangePattern(ExchangePattern exchangePattern)
          ExchangePattern: set the ExchangePattern into the Exchange.
 Type setFaultBody(Expression expression)
          Adds a processor which sets the body on the FAULT message
 Type setFaultHeader(String name, Expression expression)
          Deprecated. use setHeader(String, org.apache.camel.Expression)
 ExpressionClause<ProcessorDefinition<Type>> setHeader(String name)
          Adds a processor which sets the header on the IN message
 Type setHeader(String name, Expression expression)
          Adds a processor which sets the header on the IN message
 void setInheritErrorHandler(Boolean inheritErrorHandler)
           
 void setNodeFactory(NodeFactory nodeFactory)
           
 void setOtherAttributes(Map<QName,Object> otherAttributes)
           
 ExpressionClause<ProcessorDefinition<Type>> setOutHeader(String name)
          Deprecated. use setHeader(String)
 Type setOutHeader(String name, Expression expression)
          Deprecated. use setHeader(String, org.apache.camel.Expression)
 void setParent(ProcessorDefinition parent)
           
 ExpressionClause<ProcessorDefinition<Type>> setProperty(String name)
          Adds a processor which sets the exchange property
 Type setProperty(String name, Expression expression)
          Adds a processor which sets the exchange property
 ExpressionClause<SortDefinition> sort()
          Sorts the expression
 Type sort(Expression expression)
          Sorts the expression using a default sorting based on toString representation.
 Type sort(Expression expression, Comparator comparator)
          Sorts the expression using the given comparator
 ExpressionClause<SplitDefinition> split()
          Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.
 SplitDefinition split(Expression expression)
          Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.
 SplitDefinition split(Expression expression, AggregationStrategy aggregationStrategy)
          Splitter EIP: Creates a splitter allowing you split a message into a number of pieces and process them individually.
 Type stop()
          Stops continue routing the current Exchange and marks it as completed.
 ThreadsDefinition threads()
          Continues processing the Exchange using asynchronous routing engine.
 ThreadsDefinition threads(int poolSize)
          Continues processing the Exchange using asynchronous routing engine.
 ThreadsDefinition threads(int poolSize, int maxPoolSize)
          Continues processing the Exchange using asynchronous routing engine.
 ThrottleDefinition throttle(Expression maximumRequestCount)
          Throttler EIP: Creates a throttler allowing you to ensure that a specific endpoint does not get overloaded, or that we don't exceed an agreed SLA with some external service.
 ThrottleDefinition throttle(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.
 Type throwException(Exception exception)
          Sets the exception on the Exchange
 Type to(Endpoint... endpoints)
          Sends the exchange to a list of endpoints
 Type to(Endpoint endpoint)
          Sends the exchange to the given endpoint
 Type to(ExchangePattern pattern, Endpoint... endpoints)
          Sends the exchange to a list of endpoints

Notice the existing MEP is preserved

 Type to(ExchangePattern pattern, Endpoint endpoint)
          Sends the exchange with certain exchange pattern to the given endpoint

Notice the existing MEP is preserved

 Type to(ExchangePattern pattern, Iterable<Endpoint> endpoints)
          Sends the exchange to a list of endpoints
 Type to(ExchangePattern pattern, String... uris)
          Sends the exchange to a list of endpoints

Notice the existing MEP is preserved

 Type to(ExchangePattern pattern, String uri)
          Sends the exchange with certain exchange pattern to the given endpoint

Notice the existing MEP is preserved

 Type to(Iterable<Endpoint> endpoints)
          Sends the exchange to a list of endpoints
 Type to(String... uris)
          Sends the exchange to a list of endpoints
 Type to(String uri)
          Sends the exchange to the given endpoint
 Type toF(String uri, Object... args)
          Sends the exchange to the given endpoint
 PolicyDefinition transacted()
          Marks this route as transacted and uses the default transacted policy found in the registry.
 PolicyDefinition transacted(String ref)
          Marks this route as transacted.
 ExpressionClause<ProcessorDefinition<Type>> transform()
          Message Translator EIP: Adds a processor which sets the body on the OUT message
 Type transform(Expression expression)
          Message Translator EIP: Adds a processor which sets the body on the OUT message
 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.
 Type unmarshal(DataFormat dataFormat)
          DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
 Type unmarshal(DataFormatDefinition dataFormatType)
          DataFormat: Unmarshals the in body using the specified DataFormat and sets the output on the out message body.
 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.
 ExpressionClause<ValidateDefinition> validate()
          Creates a validation expression which only if it is true then the exchange is forwarded to the destination.
 ValidateDefinition validate(Expression expression)
          Creates a validation expression which only if it is true then the exchange is forwarded to the destination.
 ValidateDefinition validate(Predicate predicate)
          Creates a validation expression which only if it is true then the exchange is forwarded to the destination.
 WireTapDefinition<Type> wireTap(String uri)
          WireTap EIP: Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other using ExchangePattern.InOnly.
 WireTapDefinition<Type> wireTap(String uri, boolean copy, Expression body)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
 WireTapDefinition<Type> wireTap(String uri, boolean copy, Processor processor)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
 WireTapDefinition<Type> wireTap(String uri, ExecutorService executorService)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
 WireTapDefinition<Type> wireTap(String uri, Expression body)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
 WireTapDefinition<Type> wireTap(String uri, Processor processor)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
 WireTapDefinition<Type> wireTap(String uri, String executorServiceRef)
          Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0
protected  Processor wrapChannel(RouteContext routeContext, Processor processor, ProcessorDefinition child)
           
protected  Processor wrapInErrorHandler(RouteContext routeContext, ErrorHandlerBuilder builder, Processor output)
          Wraps the given output in an error handler
 Processor wrapProcessor(RouteContext routeContext, Processor processor)
          Wraps the child processor in whatever necessary interceptors and error handlers
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final transient org.slf4j.Logger log

errorHandlerBuilder

protected ErrorHandlerBuilder errorHandlerBuilder

errorHandlerRef

protected String errorHandlerRef

inheritErrorHandler

protected Boolean inheritErrorHandler
Constructor Detail

ProcessorDefinition

public ProcessorDefinition()
Method Detail

getOutputs

public abstract List<ProcessorDefinition> getOutputs()

isOutputSupported

public abstract boolean isOutputSupported()

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.

createProcessor

public Processor createProcessor(RouteContext routeContext)
                          throws Exception
Override this in definition class and implement logic to create the processor based on the definition model.

Throws:
Exception

createOutputsProcessor

public Processor createOutputsProcessor(RouteContext routeContext)
                                 throws Exception
Prefer to use {#link #createChildProcessor}.

Throws:
Exception

createChildProcessor

public Processor createChildProcessor(RouteContext routeContext,
                                      boolean mandatory)
                               throws Exception
Creates the child processor (outputs) from the current definition

Parameters:
routeContext - the route context
mandatory - whether or not children is mandatory (ie the definition should have outputs)
Returns:
the created children, or null if definition had no output
Throws:
Exception - is thrown if error creating the child or if it was mandatory and there was no output defined on definition

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()

addRoutes

public void addRoutes(RouteContext routeContext,
                      Collection<Route> routes)
               throws Exception
Throws:
Exception

wrapProcessor

public Processor wrapProcessor(RouteContext routeContext,
                               Processor processor)
                        throws Exception
Wraps the child processor in whatever necessary interceptors and error handlers

Throws:
Exception

wrapChannel

protected Processor wrapChannel(RouteContext routeContext,
                                Processor processor,
                                ProcessorDefinition child)
                         throws Exception
Throws:
Exception

wrapInErrorHandler

protected Processor wrapInErrorHandler(RouteContext routeContext,
                                       ErrorHandlerBuilder builder,
                                       Processor output)
                                throws Exception
Wraps the given output in an error handler

Parameters:
routeContext - the route context
output - the output
Returns:
the output wrapped with the error handler
Throws:
Exception - can be thrown if failed to create error handler builder

addInterceptStrategies

protected void addInterceptStrategies(RouteContext routeContext,
                                      Channel channel,
                                      List<InterceptStrategy> strategies)
Adds the given list of interceptors to the channel.

Parameters:
routeContext - the route context
channel - the channel to add strategies
strategies - list of strategies to add.

createCompositeProcessor

protected Processor createCompositeProcessor(RouteContext routeContext,
                                             List<Processor> list)
                                      throws Exception
Creates a new instance of some kind of composite processor which defaults to using a Pipeline but derived classes could change the behaviour

Throws:
Exception

createChannel

protected Channel createChannel(RouteContext routeContext)
                         throws Exception
Creates a new instance of the Channel.

Throws:
Exception

createOutputsProcessor

protected Processor createOutputsProcessor(RouteContext routeContext,
                                           Collection<ProcessorDefinition> outputs)
                                    throws Exception
Throws:
Exception

makeProcessor

protected Processor makeProcessor(RouteContext routeContext)
                           throws Exception
Creates the processor and wraps it in any necessary interceptors and error handlers

Throws:
Exception

resolvePropertyPlaceholders

protected void resolvePropertyPlaceholders(RouteContext routeContext,
                                           ProcessorDefinition definition)
                                    throws Exception
Inspects the given processor definition and resolves any property placeholders from its properties.

This implementation will check all the getter/setter pairs on this instance and for all the values (which is a String type) will be property placeholder resolved.

Parameters:
routeContext - the route context
definition - the processor definition
Throws:
Exception - is thrown if property placeholders was used and there was an error resolving them
See Also:
CamelContext.resolvePropertyPlaceholders(String), PropertiesComponent

resolveKnownConstantFields

protected void resolveKnownConstantFields(ProcessorDefinition definition)
                                   throws Exception
Inspects the given processor definition and resolves known fields

This implementation will check all the getter/setter pairs on this instance and for all the values (which is a String type) will check if it refers to a known field (such as on Exchange).

Parameters:
definition - the processor definition
Throws:
Exception

createErrorHandlerBuilder

protected ErrorHandlerBuilder createErrorHandlerBuilder()

configureChild

protected void configureChild(ProcessorDefinition output)
Strategy for children to do any custom configuration

Parameters:
output - the child to be added as output to this

placeholder

public Type placeholder(String option,
                        String key)
Adds a placeholder for the given option

Requires using the PropertiesComponent

Parameters:
option - the name of the option
key - the placeholder key
Returns:
the builder

attribute

public Type attribute(QName name,
                      Object value)
Adds an optional attribute

Parameters:
name - the name of the attribute
value - the value
Returns:
the builder

to

public Type to(String uri)
Sends the exchange to the given endpoint

Parameters:
uri - the endpoint to send to
Returns:
the builder

toF

public Type toF(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

to

public Type to(Endpoint endpoint)
Sends the exchange to the given endpoint

Parameters:
endpoint - the endpoint to send to
Returns:
the builder

to

public Type to(ExchangePattern pattern,
               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(ExchangePattern pattern,
               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(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(Endpoint... endpoints)
Sends the exchange to a list of endpoints

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

to

public Type to(Iterable<Endpoint> endpoints)
Sends the exchange to a list of endpoints

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

to

public Type to(ExchangePattern pattern,
               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(ExchangePattern pattern,
               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

public Type to(ExchangePattern pattern,
               Iterable<Endpoint> endpoints)
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

setExchangePattern

public Type setExchangePattern(ExchangePattern exchangePattern)
ExchangePattern: set the ExchangePattern into the Exchange.

The pattern set on the Exchange will

Parameters:
exchangePattern - instance of ExchangePattern
Returns:
the builder

inOnly

@Deprecated
public Type inOnly()
Deprecated. use setExchangePattern(org.apache.camel.ExchangePattern) instead

ExchangePattern: set the exchange's ExchangePattern ExchangePattern to be InOnly

Returns:
the builder

inOnly

public Type inOnly(String uri)
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

public Type inOnly(Endpoint endpoint)
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

public Type inOnly(String... uris)
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

public Type inOnly(Endpoint... endpoints)
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

public Type inOnly(Iterable<Endpoint> endpoints)
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()
Deprecated. use setExchangePattern(org.apache.camel.ExchangePattern) instead

ExchangePattern: set the exchange's ExchangePattern ExchangePattern to be InOut

Returns:
the builder

inOut

public Type inOut(String uri)
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

public Type inOut(Endpoint endpoint)
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

public Type inOut(String... uris)
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

public Type inOut(Endpoint... endpoints)
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

public Type inOut(Iterable<Endpoint> endpoints)
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

id

public Type id(String id)
Sets the id of this node

Overrides:
id in class OptionalIdentifiedDefinition
Parameters:
id - the id
Returns:
the builder

routeId

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

Parameters:
id - the route id
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(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(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

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(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(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

public Type pipeline(Collection<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

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

aop

@Deprecated
public AOPDefinition aop()
Deprecated. to be removed in the near future. Instead you can use interceptors or processors to do AOP with Camel.

Wraps the sub route using AOP allowing you to do before and after work (AOP around).

Returns:
the builder

end

public ProcessorDefinition end()
Ends the current block

Returns:
the builder

endParent

public ProcessorDefinition endParent()
Strategy to allow ProcessorDefinitions to have special logic when using end() in the DSL to return back to the intended parent.

For example a content based router we return back to the ChoiceDefinition when we end() from a WhenDefinition.

Returns:
the end

endChoice

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

Returns:
the builder

endDoTry

public TryDefinition endDoTry()
Ends the current block and returns back to the doTry() DSL.

Returns:
the builder

idempotentConsumer

public IdempotentConsumerDefinition idempotentConsumer(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(Expression messageIdExpression,
                                                       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

idempotentConsumer

@Deprecated
public ExpressionClause<IdempotentConsumerDefinition> idempotentConsumer(IdempotentRepository<?> idempotentRepository)
Deprecated. will be removed in Camel 3.0. Instead use any of the other methods

Idempotent consumer EIP: Creates an IdempotentConsumer to avoid duplicate messages

Parameters:
idempotentRepository - the repository to use for duplicate check
Returns:
the builder used to create the expression

filter

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(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(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,
                               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(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(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

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

loadBalance

public LoadBalanceDefinition loadBalance()
Load Balancer EIP: Creates a loadbalance

Returns:
the builder

loadBalance

public LoadBalanceDefinition loadBalance(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 SimpleLanguage syntax)
Returns:
the builder

log

public Type log(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 SimpleLanguage syntax)
Returns:
the builder

log

public Type log(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 SimpleLanguage syntax)
Returns:
the builder

choice

public ChoiceDefinition choice()
Content Based Router EIP: Creates a choice of one or more predicates with an otherwise clause

Returns:
the builder for a choice expression

doTry

public TryDefinition doTry()
Creates a try/catch block

Returns:
the builder for a tryBlock expression

recipientList

public RecipientListDefinition<Type> recipientList(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(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

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

@Deprecated
public Type routingSlip(String header,
                                   String uriDelimiter)
Deprecated. prefer to use routingSlip(org.apache.camel.Expression, String) instead

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:
header - is the header that the RoutingSlip class will look in for the list of URIs to route the message to.
uriDelimiter - is the delimiter that will be used to split up the list of URIs in the routing slip.
Returns:
the builder

routingSlip

@Deprecated
public Type routingSlip(String header)
Deprecated. prefer to use routingSlip(org.apache.camel.Expression) instead

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:
header - is the header that the RoutingSlip class will look in for the list of URIs to route the message to.
Returns:
the builder

routingSlip

@Deprecated
public Type routingSlip(String header,
                                   String uriDelimiter,
                                   boolean ignoreInvalidEndpoints)
Deprecated. prefer to use routingSlip() instead

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:
header - is the header that the RoutingSlip class will look in for the list of URIs to route the message to.
uriDelimiter - is the delimiter that will be used to split up the list of URIs in the routing slip.
ignoreInvalidEndpoints - if this parameter is true, routingSlip will ignore the endpoints which cannot be resolved or a producer cannot be created or started
Returns:
the builder

routingSlip

@Deprecated
public Type routingSlip(String header,
                                   boolean ignoreInvalidEndpoints)
Deprecated. prefer to use routingSlip() instead

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:
header - is the header that the RoutingSlip class will look in for the list of URIs to route the message to.
ignoreInvalidEndpoints - if this parameter is true, routingSlip will ignore the endpoints which cannot be resolved or a producer cannot be created or started
Returns:
the builder

routingSlip

public RoutingSlipDefinition<Type> routingSlip(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(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(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

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(long samplePeriod,
                                 TimeUnit unit)
Sampling Throttler Creates a sampling throttler allowing you to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during which only a single exchange is allowed to pass through. All other exchanges will be stopped.

Parameters:
samplePeriod - this is the sample interval, only one exchange is allowed through in this 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(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(Expression expression,
                             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(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(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(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(Expression correlationExpression,
                                     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(Expression delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.

Parameters:
delay - an expression to calculate the delay time in millis
Returns:
the builder

delay

public ExpressionClause<DelayDefinition> delay()
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.

Returns:
the expression clause to create the expression

delay

public DelayDefinition delay(long delay)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.

Parameters:
delay - the delay in millis
Returns:
the builder

throttle

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

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(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. Useful mostly for testing.

Parameters:
expression - the loop expression
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. Useful mostly for testing.

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

markRollbackOnly

public Type markRollbackOnly()
Marks the exchange for rollback only.

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

Returns:
the builder
See Also:
rollback(), rollback(String), markRollbackOnlyLast()

markRollbackOnlyLast

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

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

Does not set any exception as opposed 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(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 destination
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  ExecutorService executorService)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

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 destination
executorService - a custom ExecutorService to use as thread pool for sending tapped exchanges
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  String executorServiceRef)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

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 destination
executorServiceRef - reference to lookup a custom ExecutorService to use as thread pool for sending tapped exchanges
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  Expression body)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

WireTap EIP: Sends a new Exchange to the destination using ExchangePattern.InOnly.

Will use a copy of the original Exchange which is passed in as argument to the given expression

Parameters:
uri - the destination
body - expression that creates the body to send
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  boolean copy,
                                                  Expression body)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

WireTap EIP: Sends a new Exchange to the destination using ExchangePattern.InOnly.

Parameters:
uri - the destination
copy - whether or not use a copy of the original exchange or a new empty exchange
body - expression that creates the body to send
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  Processor processor)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

WireTap EIP: Sends a new Exchange to the destination using ExchangePattern.InOnly.

Will use a copy of the original Exchange which is passed in as argument to the given processor

Parameters:
uri - the destination
processor - processor preparing the new exchange to send
Returns:
the builder

wireTap

@Deprecated
public WireTapDefinition<Type> wireTap(String uri,
                                                  boolean copy,
                                                  Processor processor)
Deprecated. use the fluent builder from WireTapDefinition, will be removed in Camel 3.0

WireTap EIP: Sends a new Exchange to the destination using ExchangePattern.InOnly.

Parameters:
uri - the destination
copy - whether or not use a copy of the original exchange or a new empty exchange
processor - processor preparing the new exchange to send
Returns:
the builder

stop

public Type stop()
Stops continue routing the current Exchange and marks it as completed.

Returns:
the builder

onException

public OnExceptionDefinition onException(Class 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... 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(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 PolicyDefinition transacted()
Marks this route as transacted and uses the default transacted policy found in the registry.

Returns:
the policy builder to configure

transacted

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

process

public Type process(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

processRef

public Type processRef(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
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
method - the method name to invoke on the bean (can be used to avoid ambiguity)
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,
                 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

beanRef

public Type beanRef(String ref)
Message Translator EIP: Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline

Parameters:
ref - reference to a bean to lookup in the registry
Returns:
the builder

beanRef

public Type beanRef(String ref,
                    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:
ref - reference to a bean to lookup in the registry
method - the method name to invoke on the bean (can be used to avoid ambiguity)
Returns:
the builder

setBody

public ExpressionClause<ProcessorDefinition<Type>> setBody()
Message Translator EIP: Adds a processor which sets the body on the IN message

Returns:
a expression builder clause to set the body

setBody

public Type setBody(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

transform

public Type transform(Expression expression)
Message Translator EIP: Adds a processor which sets the body on the OUT message

Parameters:
expression - the expression used to set the body
Returns:
the builder

transform

public ExpressionClause<ProcessorDefinition<Type>> transform()
Message Translator EIP: Adds a processor which sets the body on the OUT message

Returns:
a expression builder clause to set the body

setFaultBody

public Type setFaultBody(Expression expression)
Adds a processor which sets the body on the FAULT message

Parameters:
expression - the expression used to set the body
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,
                      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

setOutHeader

@Deprecated
public ExpressionClause<ProcessorDefinition<Type>> setOutHeader(String name)
Deprecated. use setHeader(String)

Adds a processor which sets the header on the OUT message

Parameters:
name - the header name
Returns:
a expression builder clause to set the header

setOutHeader

@Deprecated
public Type setOutHeader(String name,
                                    Expression expression)
Deprecated. use setHeader(String, org.apache.camel.Expression)

Adds a processor which sets the header on the OUT message

Parameters:
name - the header name
expression - the expression used to set the header
Returns:
the builder

setFaultHeader

@Deprecated
public Type setFaultHeader(String name,
                                      Expression expression)
Deprecated. use setHeader(String, org.apache.camel.Expression)

Adds a processor which sets the header on the FAULT message

Parameters:
name - the header name
expression - the expression used to set the header
Returns:
the builder

setProperty

public Type setProperty(String name,
                        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 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

removeFaultHeader

@Deprecated
public Type removeFaultHeader(String name)
Deprecated. will be removed in the near future. Instead use removeHeader(String)

Adds a processor which removes the header on the FAULT message

Parameters:
name - the header name
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

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,
                          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 specifc charset)
Returns:
the builder

sort

public Type sort(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 Type sort(Expression expression,
                 Comparator 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

sort

public ExpressionClause<SortDefinition> sort()
Sorts the expression

Returns:
the builder

enrich

public Type enrich(String resourceUri,
                   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(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

enrichRef

public Type enrichRef(String resourceRef,
                      String aggregationStrategyRef)
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.

Parameters:
resourceRef - Reference of resource endpoint for obtaining additional data.
aggregationStrategyRef - Reference of aggregation strategy to aggregate input data and additional data.
Returns:
the builder
See Also:
Enricher

pollEnrich

public Type pollEnrich(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 avialable, 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(String resourceUri,
                       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 avialable, 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(String resourceUri,
                       long timeout,
                       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(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

pollEnrichRef

public Type pollEnrichRef(String resourceRef,
                          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:
resourceRef - Reference 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

onCompletion

public OnCompletionDefinition onCompletion()
Adds a onComplection 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(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(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

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(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

getParent

public ProcessorDefinition getParent()

setParent

public void setParent(ProcessorDefinition parent)

getErrorHandlerBuilder

public ErrorHandlerBuilder getErrorHandlerBuilder()

setErrorHandlerBuilder

public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
Sets the error handler to use with processors created by this builder


getNodeFactory

public NodeFactory getNodeFactory()

setNodeFactory

public void setNodeFactory(NodeFactory nodeFactory)

getInterceptStrategies

public List<InterceptStrategy> getInterceptStrategies()

addInterceptStrategy

public void addInterceptStrategy(InterceptStrategy strategy)

isInheritErrorHandler

public Boolean isInheritErrorHandler()

setInheritErrorHandler

public void setInheritErrorHandler(Boolean inheritErrorHandler)

getOtherAttributes

public Map<QName,Object> getOtherAttributes()

setOtherAttributes

public void setOtherAttributes(Map<QName,Object> otherAttributes)

getLabel

public String getLabel()
Returns a label to describe this node such as the expression if some kind of expression node



Apache CAMEL