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

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedType<Type>
      extended by org.apache.camel.model.ProcessorDefinition<Type>
All Implemented Interfaces:
Block
Direct Known Subclasses:
AggregateDefinition, CatchDefinition, ChoiceDefinition, ConvertBodyDefinition, ExpressionNode, LoadBalanceDefinition, OnExceptionDefinition, OutputDefinition, ResequenceDefinition, RouteDefinition, RoutingSlipDefinition, SendDefinition, ThreadDefinition, ThrottleDefinition, ThrowFaultDefinition

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

Base class for processor types that most XML types extend.

Version:
$Revision: 751648 $

Field Summary
 
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType
nodeCounters
 
Constructor Summary
ProcessorDefinition()
           
 
Method Summary
 void addInterceptor(AbstractInterceptorDefinition interceptor)
          Adds an interceptor around the whole of this nodes processing
 void addInterceptor(DelegateProcessor interceptor)
          Adds an interceptor around the whole of this nodes processing
 void addOutput(ProcessorDefinition processorType)
           
 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.
 AggregateDefinition aggregate(AggregationCollection aggregationCollection)
          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.
 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)
           
 Type convertBodyTo(Class type)
          Converts the IN message body to the specified type
 Type convertBodyTo(String typeString)
          Converts the IN message body to the specified class type
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)
           
protected  Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorDefinition> outputs)
           
 Processor createProcessor(RouteContext routeContext)
           
 ExpressionClause<DelayDefinition> delay()
          Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
 DelayDefinition delay(Expression processAtExpression)
          Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.
 DelayDefinition delay(Expression processAtExpression, long 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.
 ProcessorDefinition<? extends ProcessorDefinition> end()
          Ends the current block
 Type enrich(String resourceUri, AggregationStrategy aggregationStrategy)
          Enriches an exchange with additional data obtained from a resourceUri.
 Type errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
          Installs the given error handler builder.
 ExpressionClause<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()
           
 String getErrorHandlerRef()
           
 Boolean getInheritErrorHandlerFlag()
           
 String getLabel()
          Returns a label to describe this node such as the expression if some kind of expression node
 NodeFactory getNodeFactory()
           
abstract  List<ProcessorDefinition> getOutputs()
           
 ProcessorDefinition<? extends ProcessorDefinition> getParent()
           
 Type handleFault()
          Forces handling of faults as exceptions
 IdempotentConsumerDefinition idempotentConsumer()
          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)
          Idempotent consumer EIP: Creates an IdempotentConsumer to avoid duplicate messages
 Type inheritErrorHandler(boolean condition)
          Configures whether or not the error handler is inherited by every processing node (or just the top most one)
 Type inOnly()
          ExchangePattern: set the exchange's ExchangePattern ExchangePattern to be InOnly
 Type inOnly(Endpoint... endpoints)
          Sends the message to the given endpoints using an Event Message or InOnly exchange pattern
 Type inOnly(Endpoint endpoint)
          Sends the message to the given endpoint using an Event Message or InOnly exchange pattern
 Type inOnly(Iterable<Endpoint> endpoints)
          Sends the message to the given endpoints using an Event Message or InOnly exchange pattern
 Type inOnly(String... uris)
          Sends the message to the given endpoints using an Event Message or InOnly exchange pattern
 Type inOnly(String uri)
          Sends the message to the given endpoint using an Event Message or InOnly exchange pattern
 Type inOut()
          ExchangePattern: set the exchange's ExchangePattern ExchangePattern to be InOut
 Type inOut(Endpoint... endpoints)
          Sends the message to the given endpoints using an Request Reply or InOut exchange pattern
 Type inOut(Endpoint endpoint)
          Sends the message to the given endpoint using an Request Reply or InOut exchange pattern
 Type inOut(Iterable<Endpoint> endpoints)
          Sends the message to the given endpoints using an Request Reply or InOut exchange pattern
 Type inOut(String... uris)
          Sends the message to the given endpoints using an Request Reply or InOut exchange pattern
 Type inOut(String uri)
          Sends the message to the given endpoint using an Request Reply or InOut exchange pattern
 InterceptDefinition intercept()
          Intercepts outputs added to this node in the future (i.e.
 void intercept(AbstractInterceptorDefinition interceptor)
          Intercepts outputs added to this node in the future (i.e.
 Type intercept(DelegateProcessor interceptor)
          Intercepts outputs added to this node in the future (i.e.
 ChoiceDefinition intercept(Predicate predicate)
          Apply an interceptor route if the predicate is true.
 Type interceptor(String ref)
          Intercepts outputs added to this node in the future (i.e.
 Type interceptors(String... refs)
          Intercepts outputs added to this node in the future (i.e.
 boolean isInheritErrorHandler()
           
static boolean isInheritErrorHandler(Boolean value)
          Lets default the inherit value to be true if there is none specified
 LoadBalanceDefinition loadBalance()
          Load Balancer EIP: Creates a loadbalance
 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
 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.
 OnExceptionDefinition onException(Class exceptionType)
          Exception clause for cathing certain exceptions and handling them.
 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
 PolicyDefinition policies()
          Creates a policy.
 PolicyDefinition policy(Policy policy)
          Apply a Policy.
 Block popBlock()
          Pops the block off the stack as current block
 Type proceed()
          Procceeds the given intercepted route.
 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
 void pushBlock(Block block)
          Pushes the given block on the stack as current block
 ExpressionClause<ProcessorDefinition<Type>> recipientList()
          Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
 Type recipientList(Expression recipients)
          Recipient List EIP: Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
 Type removeFaultHeader(String name)
          Adds a processor which removes the header on the FAULT message
 Type removeHeader(String name)
          Adds a processor which removes the header 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.
 ResequenceDefinition resequence(List<Expression> expressions)
          Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.
 ResequenceDefinition resequencer(Expression... expressions)
          Resequencer EIP: Creates a splitter allowing you to reorganise messages based on some comparator.
 Type routingSlip(String header)
          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, 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.
 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
protected  void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
          Sets the error handler if one is not already set
 void setErrorHandlerRef(String errorHandlerRef)
          Sets the bean ref name of the error handler builder to use on this route
 Type setExchangePattern(ExchangePattern exchangePattern)
          ExchangePattern: set the ExchangePattern 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)
          Adds a processor which sets the header on the FAULT message
 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 setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)
           
 void setNodeFactory(NodeFactory nodeFactory)
           
 ExpressionClause<ProcessorDefinition<Type>> setOutHeader(String name)
          Adds a processor which sets the header on the OUT message
 Type setOutHeader(String name, Expression expression)
          Adds a processor which sets the header on the OUT message
 void setParent(ProcessorDefinition<? extends 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
 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
 Type sortBody()
          Sorts the IN message body using a default sorting based on toString representation.
 Type sortBody(Comparator comparator)
          Sorts the IN message body 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 the given intercepted route.
 ProcessorDefinition<Type> thread(Executor executor)
          Causes subsequent processors to be called asynchronously
 ThreadDefinition thread(int coreSize)
          Causes subsequent processors to be called asynchronously
 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 throwFault(String message)
          Creates a fault message based on the given message.
 Type throwFault(Throwable fault)
          Creates a fault message based on the given throwable.
 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
 Type to(ExchangePattern pattern, Endpoint endpoint)
          Sends the exchange with certain exchange pattern to the given endpoint
 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
 Type to(ExchangePattern pattern, String uri)
          Sends the exchange with certain exchange pattern to the given endpoint
 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
 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
 TryDefinition tryBlock()
          Creates a try/catch block
 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.
 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.
protected  Processor wrapInErrorHandler(RouteContext routeContext, Processor target)
          A strategy method to allow newly created processors to be wrapped in an error handler.
 Processor wrapProcessor(RouteContext routeContext, Processor processor)
          Wraps the child processor in whatever necessary interceptors and error handlers
protected  Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target)
          A strategy method which allows derived classes to wrap the child processor in some kind of interceptor
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedType
createId, description, getDescription, getId, getNodeCounter, getShortName, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorDefinition

public ProcessorDefinition()
Method Detail

getOutputs

public abstract List<ProcessorDefinition> getOutputs()

createProcessor

public Processor createProcessor(RouteContext routeContext)
                          throws Exception
Throws:
Exception

createOutputsProcessor

public Processor createOutputsProcessor(RouteContext routeContext)
                                 throws Exception
Throws:
Exception

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

to

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

Parameters:
uri - the endpoint to send to
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

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

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

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

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 ExchangePattern into the exchange

Parameters:
exchangePattern - instance of ExchangePattern
Returns:
the builder

inOnly

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

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

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

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

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

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

inOut

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

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

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

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

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

Parameters:
endpoints - list of endpoints to send to
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 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

end

public ProcessorDefinition<? extends ProcessorDefinition> end()
Ends the current block

Returns:
the builder

thread

public ThreadDefinition thread(int coreSize)
Causes subsequent processors to be called asynchronously

Parameters:
coreSize - the number of threads that will be used to process messages in subsequent processors.
Returns:
a ThreadType builder that can be used to further configure the the thread pool.

thread

public ProcessorDefinition<Type> thread(Executor executor)
Causes subsequent processors to be called asynchronously

Parameters:
executor - the executor that will be used to process messages in subsequent processors.
Returns:
a ThreadType builder that can be used to further configure the the thread pool.

idempotentConsumer

public IdempotentConsumerDefinition idempotentConsumer()
Idempotent consumer EIP: Creates an IdempotentConsumer to avoid 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 chedck
Returns:
the builder

idempotentConsumer

public ExpressionClause<IdempotentConsumerDefinition> idempotentConsumer(IdempotentRepository idempotentRepository)
Idempotent consumer EIP: Creates an IdempotentConsumer to avoid duplicate messages

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

filter

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

loadBalance

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

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

tryBlock

public TryDefinition tryBlock()
Creates a try/catch block

Returns:
the builder for a tryBlock expression

recipientList

public Type recipientList(Expression recipients)
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
Returns:
the builder

recipientList

public ExpressionClause<ProcessorDefinition<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 Type routingSlip(String header,
                        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.

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 buiider

routingSlip

public Type routingSlip(String header)
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

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

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 latest message returned from destination endpoint.

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 latest message returned from destination endpoint.

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

resequence

public ResequenceDefinition resequence(List<Expression> expressions)
Resequencer EIP: Creates a resequencer allowing you to reorganize messages based on some comparator.

Parameters:
expressions - the list of expressions on which to compare messages in order
Returns:
the builder

resequencer

public ResequenceDefinition resequencer(Expression... expressions)
Resequencer EIP: Creates a splitter allowing you to reorganise messages based on some comparator.

Parameters:
expressions - the list of expressions 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(AggregationCollection aggregationCollection)
Aggregator EIP: Creates an aggregator allowing you to combine a number of messages together into a single message.

Parameters:
aggregationCollection - the collection used to perform the aggregation
Returns:
the builder

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 processAtExpression)
Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.

Parameters:
processAtExpression - an expression to calculate the time at which the messages should be processed, should be convertable to long as time in millis
Returns:
the builder

delay

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

Parameters:
processAtExpression - an expression to calculate the time at which the messages should be processed, should be convertable to long as time in millis
delay - the delay in milliseconds which is added to the processAtExpression
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 default 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

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

throwFault

public Type throwFault(Throwable fault)
Creates a fault message based on the given throwable.

Parameters:
fault - the fault
Returns:
the builder

throwFault

public Type throwFault(String message)
Creates a fault message based on the given message.

Parameters:
message - the fault message
Returns:
the builder

wireTap

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

Returns:
the builder

interceptor

public Type interceptor(String ref)
Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)

Parameters:
ref - a reference in the registry to lookup the interceptor that must be of type DelegateProcessor
Returns:
the builder

interceptors

public Type interceptors(String... refs)
Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)

Parameters:
refs - a list of reference in the registry to lookup the interceptor that must be of type DelegateProcessor
Returns:
the builder

intercept

public Type intercept(DelegateProcessor interceptor)
Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)

Parameters:
interceptor - the interceptor
Returns:
the builder

intercept

public InterceptDefinition intercept()
Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)

Returns:
the intercept builder to configure

intercept

public void intercept(AbstractInterceptorDefinition interceptor)
Intercepts outputs added to this node in the future (i.e. intercepts outputs added after this statement)

Parameters:
interceptor - the interceptor

addInterceptor

public void addInterceptor(AbstractInterceptorDefinition interceptor)
Adds an interceptor around the whole of this nodes processing

Parameters:
interceptor - the interceptor

addInterceptor

public void addInterceptor(DelegateProcessor interceptor)
Adds an interceptor around the whole of this nodes processing

Parameters:
interceptor - the interceptor

pushBlock

public void pushBlock(Block block)
Pushes the given block on the stack as current block

Parameters:
block - the block

popBlock

public Block popBlock()
Pops the block off the stack as current block

Returns:
the block

proceed

public Type proceed()
Procceeds the given intercepted route.

Proceed is used in conjunction with intercept where calling proceed will route the message through the original route path from the point of interception. This can be used to implement the detour pattern.

Returns:
the builder
See Also:
proceed()

stop

public Type stop()
Stops the given intercepted route.

As opposed to proceed() calling stop will stop the message route and not continue from the interepted origin.

Returns:
the builder
See Also:
proceed()

onException

public OnExceptionDefinition onException(Class exceptionType)
Exception clause for cathing certain exceptions and handling them.

Parameters:
exceptionType - the exception to catch
Returns:
the exception builder to configure

intercept

public ChoiceDefinition intercept(Predicate predicate)
Apply an interceptor route if the predicate is true.

Parameters:
predicate - the predicate to test
Returns:
the choice builder to configure

policies

public PolicyDefinition policies()
Creates a policy.

Policy can be used for transactional policies.

Returns:
the policy 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

handleFault

public Type handleFault()
Forces handling of faults as exceptions

Returns:
the current builder with the fault handler configured

errorHandler

public Type errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
Installs the given error handler builder.

Parameters:
errorHandlerBuilder - the error handler to be used by default for all child routes
Returns:
the current builder with the error handler configured

inheritErrorHandler

public Type inheritErrorHandler(boolean condition)
Configures whether or not the error handler is inherited by every processing node (or just the top most one)

Parameters:
condition - the flag as to whether error handlers should be inherited or not
Returns:
the current builder

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

public ExpressionClause<ProcessorDefinition<Type>> setOutHeader(String name)
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

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

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

removeFaultHeader

public Type removeFaultHeader(String name)
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(String typeString)
Converts the IN message body to the specified class type

Parameters:
typeString - the type to convert to as a fully qualified classname
Returns:
the builder

sortBody

public Type sortBody(Comparator comparator)
Sorts the IN message body using the given comparator. The IN body mut be convertable to List.

Parameters:
comparator - the comparator to use for sorting
Returns:
the builder

sortBody

public Type sortBody()
Sorts the IN message body using a default sorting based on toString representation. The IN body mut 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 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

enrich

public Type enrich(String resourceUri,
                   AggregationStrategy aggregationStrategy)
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:
this processor type
See Also:
Enricher

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

getParent

public ProcessorDefinition<? extends ProcessorDefinition> getParent()

setParent

public void setParent(ProcessorDefinition<? extends ProcessorDefinition> parent)

getErrorHandlerBuilder

public ErrorHandlerBuilder getErrorHandlerBuilder()

setErrorHandlerBuilder

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


setErrorHandlerBuilderIfNull

protected void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
Sets the error handler if one is not already set


getErrorHandlerRef

public String getErrorHandlerRef()

setErrorHandlerRef

public void setErrorHandlerRef(String errorHandlerRef)
Sets the bean ref name of the error handler builder to use on this route


isInheritErrorHandler

public boolean isInheritErrorHandler()

isInheritErrorHandler

public static boolean isInheritErrorHandler(Boolean value)
Lets default the inherit value to be true if there is none specified


getInheritErrorHandlerFlag

public Boolean getInheritErrorHandlerFlag()

setInheritErrorHandlerFlag

public void setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)

getNodeFactory

public NodeFactory getNodeFactory()

setNodeFactory

public void setNodeFactory(NodeFactory nodeFactory)

getLabel

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


makeProcessor

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

Throws:
Exception

wrapProcessorInInterceptors

protected Processor wrapProcessorInInterceptors(RouteContext routeContext,
                                                Processor target)
                                         throws Exception
A strategy method which allows derived classes to wrap the child processor in some kind of interceptor

Parameters:
routeContext - the route context
target - the processor which can be wrapped
Returns:
the original processor or a new wrapped interceptor
Throws:
Exception - can be thrown in case of error

wrapInErrorHandler

protected Processor wrapInErrorHandler(RouteContext routeContext,
                                       Processor target)
                                throws Exception
A strategy method to allow newly created processors to be wrapped in an error handler.

Throws:
Exception

createErrorHandlerBuilder

protected ErrorHandlerBuilder createErrorHandlerBuilder()

configureChild

protected void configureChild(ProcessorDefinition output)

addOutput

public void addOutput(ProcessorDefinition processorType)
Specified by:
addOutput in interface Block

createCompositeProcessor

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


createOutputsProcessor

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

clearOutput

public void clearOutput()


Copyright © 2009 Apache Software Foundation. All Rights Reserved.