|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.OptionalIdentifiedType<Type> org.apache.camel.model.ProcessorDefinition<Type>
public abstract class ProcessorDefinition<Type extends ProcessorDefinition>
Base class for processor types that most XML types extend.
Field Summary |
---|
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType |
---|
nodeCounters |
Constructor Summary | |
---|---|
ProcessorDefinition()
|
Method Summary | |
---|---|
void |
addInterceptStrategy(InterceptStrategy strategy)
|
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. |
AOPDefinition |
aop()
Wraps the sub route using AOP allowing you to do before and after work (AOP around). |
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(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 . |
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 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 |
ProcessorDefinition<? extends ProcessorDefinition> |
end()
Ends the current block |
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 |
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()
|
List<InterceptStrategy> |
getInterceptStrategies()
|
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 |
id(String id)
Sets the id of this node |
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 |
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 |
LoadBalanceDefinition |
loadBalance()
Load Balancer EIP: Creates a loadbalance |
LoadBalanceDefinition |
loadBalance(LoadBalancer loadBalancer)
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. |
OnCompletionDefinition |
onCompletion()
Adds a onComplection Synchronization hook that invoke this route as
a callback when the Exchange has finished being processed. |
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 |
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 |
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<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 |
rollback()
Marks the exchange for rollback only. |
Type |
rollback(String message)
Marks the exchange for rollback only. |
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 |
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 continue routing the current Exchange and marks it as completed. |
ThreadsDefinition |
threads()
Leverages a thread pool for multi threading processing exchanges. |
ThreadsDefinition |
threads(int poolSize)
Leverages a thread pool for multi threading processing exchanges. |
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 |
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 |
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. |
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 . |
Type |
wireTap(String uri,
Expression body)
WireTap EIP: Sends a new Exchange to the destination
using ExchangePattern.InOnly . |
Type |
wireTap(String uri,
Processor processor)
WireTap EIP: Sends a new Exchange to the destination
using ExchangePattern.InOnly . |
protected Processor |
wrapChannel(RouteContext routeContext,
Processor processor)
|
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.OptionalIdentifiedType |
---|
createId, description, getDescription, getId, getNodeCounter, getShortName, hasCustomIdAssigned, idOrCreate, setDescription, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcessorDefinition()
Method Detail |
---|
public abstract List<ProcessorDefinition> getOutputs()
public Processor createProcessor(RouteContext routeContext) throws Exception
Exception
public Processor createOutputsProcessor(RouteContext routeContext) throws Exception
Exception
public void addOutput(ProcessorDefinition processorType)
addOutput
in interface Block
public void clearOutput()
public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception
Exception
public Processor wrapProcessor(RouteContext routeContext, Processor processor) throws Exception
Exception
protected Processor wrapChannel(RouteContext routeContext, Processor processor) throws Exception
Exception
protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list)
Pipeline
but derived classes could change the behaviour
protected Channel createChannel(RouteContext routeContext)
Channel
.
protected Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorDefinition> outputs) throws Exception
Exception
protected Processor makeProcessor(RouteContext routeContext) throws Exception
Exception
protected ErrorHandlerBuilder createErrorHandlerBuilder()
protected void configureChild(ProcessorDefinition output)
public Type to(String uri)
uri
- the endpoint to send to
public Type toF(String uri, Object... args)
uri
- the String formatted endpoint uri to send toargs
- arguments for the string formatting of the uri
public Type to(Endpoint endpoint)
endpoint
- the endpoint to send to
public Type to(ExchangePattern pattern, String uri)
pattern
- the pattern to use for the message exchangeuri
- the endpoint to send to
public Type to(ExchangePattern pattern, Endpoint endpoint)
pattern
- the pattern to use for the message exchangeendpoint
- the endpoint to send to
public Type to(String... uris)
uris
- list of endpoints to send to
public Type to(Endpoint... endpoints)
endpoints
- list of endpoints to send to
public Type to(Iterable<Endpoint> endpoints)
endpoints
- list of endpoints to send to
public Type to(ExchangePattern pattern, String... uris)
pattern
- the pattern to use for the message exchangesuris
- list of endpoints to send to
public Type to(ExchangePattern pattern, Endpoint... endpoints)
pattern
- the pattern to use for the message exchangesendpoints
- list of endpoints to send to
public Type to(ExchangePattern pattern, Iterable<Endpoint> endpoints)
pattern
- the pattern to use for the message exchangesendpoints
- list of endpoints to send to
public Type setExchangePattern(ExchangePattern exchangePattern)
ExchangePattern
into the exchange
exchangePattern
- instance of ExchangePattern
public Type inOnly()
ExchangePattern
to be InOnly
public Type inOnly(String uri)
uri
- The endpoint uri which is used for sending the exchange
public Type inOnly(Endpoint endpoint)
endpoint
- The endpoint which is used for sending the exchange
public Type inOnly(String... uris)
uris
- list of endpoints to send to
public Type inOnly(Endpoint... endpoints)
endpoints
- list of endpoints to send to
public Type inOnly(Iterable<Endpoint> endpoints)
endpoints
- list of endpoints to send to
public Type inOut()
ExchangePattern
to be InOut
public Type inOut(String uri)
uri
- The endpoint uri which is used for sending the exchange
public Type inOut(Endpoint endpoint)
endpoint
- The endpoint which is used for sending the exchange
public Type inOut(String... uris)
uris
- list of endpoints to send to
public Type inOut(Endpoint... endpoints)
endpoints
- list of endpoints to send to
public Type inOut(Iterable<Endpoint> endpoints)
endpoints
- list of endpoints to send to
public Type id(String id)
id
in class OptionalIdentifiedType<Type extends ProcessorDefinition>
id
- the id
public MulticastDefinition multicast()
public MulticastDefinition multicast(AggregationStrategy aggregationStrategy, boolean parallelProcessing)
aggregationStrategy
- the strategy used to aggregate responses for
every partparallelProcessing
- if is true camel will fork thread to call the endpoint producer
public MulticastDefinition multicast(AggregationStrategy aggregationStrategy)
aggregationStrategy
- the strategy used to aggregate responses for
every part
public Type pipeline(String... uris)
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
uris
- list of endpoints
public Type pipeline(Endpoint... endpoints)
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
endpoints
- list of endpoints
public Type pipeline(Collection<Endpoint> endpoints)
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
endpoints
- list of endpoints
public ThreadsDefinition threads()
Future
handle so you can get the real response
later using this handle.
Will default Always wait for the async route to complete, but this behavior can be overriden by:
Exchange.ASYNC_WAIT
with the
value containing a type WaitForTaskToComplete
. The header will take precedence, if provided.
public ThreadsDefinition threads(int poolSize)
threads()
for more details.
poolSize
- the core pool size
public AOPDefinition aop()
public ProcessorDefinition<? extends ProcessorDefinition> end()
public IdempotentConsumerDefinition idempotentConsumer()
IdempotentConsumer
to avoid duplicate messages
public IdempotentConsumerDefinition idempotentConsumer(Expression messageIdExpression, IdempotentRepository idempotentRepository)
IdempotentConsumer
to avoid duplicate messages
messageIdExpression
- expression to test of duplicate messagesidempotentRepository
- the repository to use for duplicate chedck
public ExpressionClause<IdempotentConsumerDefinition> idempotentConsumer(IdempotentRepository idempotentRepository)
IdempotentConsumer
to avoid duplicate messages
idempotentRepository
- the repository to use for duplicate chedck
public ExpressionClause<FilterDefinition> filter()
public FilterDefinition filter(Predicate predicate)
predicate
- predicate to use
public FilterDefinition filter(ExpressionDefinition expression)
expression
- the predicate expression to use
public FilterDefinition filter(String language, String expression)
language
- language for expressionexpression
- the expression
public LoadBalanceDefinition loadBalance()
public LoadBalanceDefinition loadBalance(LoadBalancer loadBalancer)
loadBalancer
- a custom load balancer to use
public ChoiceDefinition choice()
public TryDefinition doTry()
public Type recipientList(Expression recipients)
recipients
- expression to decide the destinations
public ExpressionClause<ProcessorDefinition<Type>> recipientList()
public Type routingSlip(String header, String uriDelimiter)
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.
public Type routingSlip(String header)
The list of URIs will be split based on the default delimiter RoutingSlipDefinition.DEFAULT_DELIMITER
header
- is the header that the RoutingSlip
class will look in for the list of URIs to route the message to.
public ExpressionClause<SplitDefinition> split()
This splitter responds with the latest message returned from destination endpoint.
public SplitDefinition split(Expression expression)
This splitter responds with the latest message returned from destination endpoint.
expression
- the expression on which to split the message
public SplitDefinition split(Expression expression, AggregationStrategy aggregationStrategy)
The splitter responds with the answer produced by the given AggregationStrategy
.
expression
- the expression on which to splitaggregationStrategy
- the strategy used to aggregate responses for every part
public ExpressionClause<ResequenceDefinition> resequence()
public ResequenceDefinition resequence(Expression expression)
expression
- the expression on which to compare messages in order
public ResequenceDefinition resequence(List<Expression> expressions)
expressions
- the list of expressions on which to compare messages in order
public ResequenceDefinition resequencer(Expression... expressions)
expressions
- the list of expressions on which to compare messages in order
public ExpressionClause<AggregateDefinition> aggregate()
public ExpressionClause<AggregateDefinition> aggregate(AggregationStrategy aggregationStrategy)
aggregationStrategy
- the strategy used for the aggregation
public AggregateDefinition aggregate(AggregationCollection aggregationCollection)
aggregationCollection
- the collection used to perform the aggregation
public AggregateDefinition aggregate(Expression correlationExpression)
correlationExpression
- the expression used to calculate the
correlation key. For a JMS message this could be the
expression header("JMSDestination")
or
header("JMSCorrelationID")
public AggregateDefinition aggregate(Expression correlationExpression, AggregationStrategy aggregationStrategy)
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
public DelayDefinition delay(Expression delay)
delay
- an expression to calculate the delay time in millis
public ExpressionClause<DelayDefinition> delay()
public DelayDefinition delay(long delay)
delay
- the delay in millis
public ThrottleDefinition throttle(long maximumRequestCount)
maximumRequestCount
- the maximum messages
public ExpressionClause<LoopDefinition> loop()
public LoopDefinition loop(Expression expression)
expression
- the loop expression
public LoopDefinition loop(int count)
count
- the number of times
public Type throwException(Exception exception)
Exchange
exception
- the exception to throw
public Type rollback()
RollbackExchangeException
on the Exchange
and mark it for rollback.
public Type rollback(String message)
RollbackExchangeException
on the Exchange
and mark it for rollback.
message
- an optional message used for logging purpose why the rollback was triggered
public Type wireTap(String uri)
ExchangePattern.InOnly
.
public Type wireTap(String uri, Expression body)
Exchange
to the destination
using ExchangePattern.InOnly
.
uri
- the destinationbody
- expression that creates the body to send
public Type wireTap(String uri, Processor processor)
Exchange
to the destination
using ExchangePattern.InOnly
.
uri
- the destinationprocessor
- processor preparing the new exchange to send
public Type stop()
Exchange
and marks it as completed.
public OnExceptionDefinition onException(Class exceptionType)
exceptionType
- the exception to catch
public PolicyDefinition policy(Policy policy)
Policy
.
Policy can be used for transactional policies.
policy
- the policy to apply
public PolicyDefinition policy(String ref)
Policy
.
Policy can be used for transactional policies.
ref
- reference to lookup a policy in the registry
public PolicyDefinition transacted()
public PolicyDefinition transacted(String ref)
ref
- reference to lookup a transacted policy in the registry
public Type errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for all child routes
public Type process(Processor processor)
processor
- the custom Processor
public Type processRef(String ref)
ref
- reference to a Processor
to lookup in the registry
public Type bean(Object bean)
bean
- the bean to invoke
public Type bean(Object bean, String method)
bean
- the bean to invokemethod
- the method name to invoke on the bean (can be used to avoid ambiguty)
public Type bean(Class beanType)
beanType
- the bean class, Camel will instantiate an object at runtime
public Type bean(Class beanType, String method)
beanType
- the bean class, Camel will instantiate an object at runtimemethod
- the method name to invoke on the bean (can be used to avoid ambiguty)
public Type beanRef(String ref)
ref
- reference to a bean to lookup in the registry
public Type beanRef(String ref, String method)
ref
- reference to a bean to lookup in the registrymethod
- the method name to invoke on the bean (can be used to avoid ambiguty)
public ExpressionClause<ProcessorDefinition<Type>> setBody()
public Type setBody(Expression expression)
expression
- the expression used to set the body
public Type transform(Expression expression)
expression
- the expression used to set the body
public ExpressionClause<ProcessorDefinition<Type>> transform()
public Type setFaultBody(Expression expression)
expression
- the expression used to set the body
public ExpressionClause<ProcessorDefinition<Type>> setHeader(String name)
name
- the header name
public Type setHeader(String name, Expression expression)
name
- the header nameexpression
- the expression used to set the header
public ExpressionClause<ProcessorDefinition<Type>> setOutHeader(String name)
name
- the header name
public Type setOutHeader(String name, Expression expression)
name
- the header nameexpression
- the expression used to set the header
public Type setFaultHeader(String name, Expression expression)
name
- the header nameexpression
- the expression used to set the header
public Type setProperty(String name, Expression expression)
name
- the property nameexpression
- the expression used to set the property
public ExpressionClause<ProcessorDefinition<Type>> setProperty(String name)
name
- the property name
public Type removeHeader(String name)
name
- the header name
public Type removeFaultHeader(String name)
name
- the header name
public Type removeProperty(String name)
name
- the property name
public Type convertBodyTo(Class type)
type
- the type to convert to
public Type convertBodyTo(Class type, String charset)
type
- the type to convert tocharset
- the charset to use by type converters (not all converters support specifc charset)
public Type sortBody(Comparator comparator)
List
.
comparator
- the comparator to use for sorting
public Type sortBody()
List
.
public Type sort(Expression expression, Comparator comparator)
expression
- the expression, must be convertable to List
comparator
- the comparator to use for sorting
public Type sort(Expression expression)
expression
- the expression, must be convertable to List
public Type enrich(String resourceUri, AggregationStrategy aggregationStrategy)
resourceUri
.
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.
Enricher
public Type enrich(String resourceUri)
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.
resourceUri
- URI of resource endpoint for obtaining additional data.
Enricher
public Type pollEnrich(String resourceUri)
resourceUri
using a PollingConsumer
to poll the endpoint.
The difference between this and enrich(String)
is that this uses a consumer
to obatin 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.
resourceUri
- URI of resource endpoint for obtaining additional data.
PollEnricher
public Type pollEnrich(String resourceUri, AggregationStrategy aggregationStrategy)
resourceUri
using a PollingConsumer
to poll the endpoint.
The difference between this and enrich(String)
is that this uses a consumer
to obatin 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.
resourceUri
- URI of resource endpoint for obtaining additional data.aggregationStrategy
- aggregation strategy to aggregate input data and additional data.
PollEnricher
public Type pollEnrich(String resourceUri, long timeout, AggregationStrategy aggregationStrategy)
resourceUri
using a PollingConsumer
to poll the endpoint.
The difference between this and enrich(String)
is that this uses a consumer
to obatin 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).
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.
PollEnricher
public Type pollEnrich(String resourceUri, long timeout)
resourceUri
using a PollingConsumer
to poll the endpoint.
The difference between this and enrich(String)
is that this uses a consumer
to obatin 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).
resourceUri
- URI of resource endpoint for obtaining additional data.timeout
- timeout in millis to wait at most for data to be available.
PollEnricher
public OnCompletionDefinition onCompletion()
Synchronization
hook that invoke this route as
a callback when the Exchange
has finished being processed.
The hook invoke callbacks for either onComplete or onFailure.
Will by default always trigger when the Exchange
is complete
(either with success or failed).
Exchange
with the key Exchange.EXCEPTION_CAUGHT
.
public DataFormatClause<ProcessorDefinition<Type>> unmarshal()
DataFormat
expression to define
the format of the input message and the output will be set on the out message body.
DataFormat
public Type unmarshal(DataFormatDefinition dataFormatType)
DataFormat
and sets the output on the out message body.
dataFormatType
- the dataformat
public Type unmarshal(DataFormat dataFormat)
DataFormat
and sets the output on the out message body.
dataFormat
- the dataformat
public Type unmarshal(String dataTypeRef)
DataFormat
reference in the Registry
and sets
the output on the out message body.
dataTypeRef
- reference to a DataFormat
to lookup in the registry
public DataFormatClause<ProcessorDefinition<Type>> marshal()
DataFormat
expression to define
the format of the output which will be added to the out body.
DataFormat
public Type marshal(DataFormatDefinition dataFormatType)
DataFormat
and sets the output on the out message body.
dataFormatType
- the dataformat
public Type marshal(DataFormat dataFormat)
DataFormat
and sets the output on the out message body.
dataFormat
- the dataformat
public Type marshal(String dataTypeRef)
DataFormat
reference in the Registry
and sets
the output on the out message body.
dataTypeRef
- reference to a DataFormat
to lookup in the registry
public ProcessorDefinition<? extends ProcessorDefinition> getParent()
public void setParent(ProcessorDefinition<? extends ProcessorDefinition> parent)
public ErrorHandlerBuilder getErrorHandlerBuilder()
public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
protected void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
public String getErrorHandlerRef()
public void setErrorHandlerRef(String errorHandlerRef)
public NodeFactory getNodeFactory()
public void setNodeFactory(NodeFactory nodeFactory)
public List<InterceptStrategy> getInterceptStrategies()
public void addInterceptStrategy(InterceptStrategy strategy)
public String getLabel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |