|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.ProcessorType
public abstract class ProcessorType
Field Summary | |
---|---|
static String |
DEFAULT_TRACE_CATEGORY
|
Constructor Summary | |
---|---|
ProcessorType()
|
Method Summary | |
---|---|
protected void |
addOutput(ProcessorType processorType)
|
void |
addRoutes(RouteContext routeContext,
Collection<Route> routes)
|
AggregatorType |
aggregator(Expression correlationExpression)
A builder for the Aggregator pattern where a batch of messages are processed (up to a maximum amount or until some timeout is reached) and messages for the same correlation key are combined together using some kind of {@link AggregationStrategy ) (by default the latest message is used) to compress many message exchanges into a smaller number of exchanges. |
AggregatorType |
aggregator(Expression correlationExpression,
AggregationStrategy aggregationStrategy)
A builder for the Aggregator pattern where a batch of messages are processed (up to a maximum amount or until some timeout is reached) and messages for the same correlation key are combined together using some kind of {@link AggregationStrategy ) (by default the latest message is used) to compress many message exchanges into a smaller number of exchanges. |
ProcessorType |
beanRef(String ref)
Adds a bean which is invoked which could be a final destination, or could be a transformation in a pipeline |
ProcessorType |
beanRef(String ref,
String method)
Adds a bean and method which is invoked which could be a final destination, or could be a transformation in a pipeline |
ChoiceType |
choice()
Creates a choice of one or more predicates with an otherwise clause |
protected void |
configureChild(ProcessorType output)
|
ProcessorType |
convertBodyTo(Class type)
Converts the IN message body to the specified type |
ProcessorType |
convertOutBodyTo(Class type)
Converts the OUT message body to the specified type |
protected Processor |
createCompositeProcessor(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<ProcessorType> outputs)
|
Processor |
createProcessor(RouteContext routeContext)
|
DelayerType |
delayer(Expression<Exchange> processAtExpression)
A builder for the Delayer pattern where an expression is used to calculate the time which the message will be dispatched on |
DelayerType |
delayer(Expression<Exchange> processAtExpression,
long delay)
A builder for the Delayer pattern where an expression is used to calculate the time which the message will be dispatched on |
DelayerType |
delayer(long delay)
A builder for the Delayer pattern where a fixed amount of milliseconds are used to delay processing of a message exchange |
ProcessorType |
errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
Installs the given error handler builder |
ExceptionType |
exception(Class exceptionType)
|
FilterType |
filter(ExpressionType expression)
|
FilterType |
filter(Predicate predicate)
Creates a predicate which is applied and only if it is true then the exchange is forwarded to the destination |
FilterType |
filter(String language,
String expression)
|
ErrorHandlerBuilder |
getErrorHandlerBuilder()
|
Boolean |
getInheritErrorHandlerFlag()
|
abstract List<InterceptorType> |
getInterceptors()
|
abstract List<ProcessorType> |
getOutputs()
|
IdempotentConsumerType |
idempotentConsumer(Expression messageIdExpression,
MessageIdRepository messageIdRepository)
Creates an IdempotentConsumer to avoid duplicate messages |
ProcessorType |
inheritErrorHandler(boolean condition)
Configures whether or not the error handler is inherited by every processing node (or just the top most one) |
InterceptType |
intercept()
|
ProcessorType |
intercept(DelegateProcessor interceptor)
|
OtherwiseType |
intercept(Predicate predicate)
Apply an interceptor route if the predicate is true |
ProcessorType |
interceptor(String ref)
|
ProcessorType |
interceptors(String... refs)
|
boolean |
isInheritErrorHandler()
|
protected Processor |
makeProcessor(RouteContext routeContext)
Creates the processor and wraps it in any necessary interceptors and error handlers |
MulticastType |
multicast()
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. |
ProcessorType |
pipeline(Collection<Endpoint> endpoints)
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 |
ProcessorType |
pipeline(Endpoint... endpoints)
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 |
ProcessorType |
pipeline(String... uris)
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 |
PolicyRef |
policies()
|
PolicyRef |
policy(Policy policy)
|
ProcessorType |
proceed()
|
ProcessorType |
process(Processor processor)
Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline |
ProcessorType |
recipientList(Expression receipients)
Creates a dynamic Recipient List pattern. |
ResequencerType |
resequencer(Expression... expressions)
A builder for the Resequencer pattern where a list of expressions are evaluated to be able to compare the message exchanges to reorder them. |
ResequencerType |
resequencer(Expression<Exchange> expression)
A builder for the Resequencer pattern where an expression is evaluated to be able to compare the message exchanges to reorder them. |
ResequencerType |
resequencer(List<Expression> expressions)
A builder for the Resequencer pattern where a list of expressions are evaluated to be able to compare the message exchanges to reorder them. |
ProcessorType |
setBody(Expression expression)
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 |
ProcessorType |
setHeader(String name,
Expression expression)
Adds a processor which sets the header on the IN message |
void |
setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)
|
ProcessorType |
setOutBody(Expression expression)
Adds a processor which sets the body on the OUT message |
ProcessorType |
setOutHeader(String name,
Expression expression)
Adds a processor which sets the header on the OUT message |
ProcessorType |
setProperty(String name,
Expression expression)
Adds a processor which sets the exchange property |
SplitterType |
splitter(Expression receipients)
A builder for the Splitter pattern where an expression is evaluated to iterate through each of the parts of a message and then each part is then send to some endpoint. |
ThrottlerType |
throttler(long maximumRequestCount)
A builder for the Delayer pattern where an expression is used to calculate the time which the message will be dispatched on |
ProcessorType |
to(Collection<Endpoint> endpoints)
Sends the exchange to a list of endpoint using the MulticastProcessor pattern |
ProcessorType |
to(Endpoint... endpoints)
Sends the exchange to a list of endpoints using the MulticastProcessor pattern |
ProcessorType |
to(Endpoint endpoint)
Sends the exchange to the given endpoint |
ProcessorType |
to(String... uris)
Sends the exchange to a list of endpoints using the MulticastProcessor pattern |
ProcessorType |
to(String uri)
Sends the exchange to the given endpoint URI |
ProcessorType |
trace()
Trace logs the exchange before it goes to the next processing step using the DEFAULT_TRACE_CATEGORY logging category. |
ProcessorType |
trace(String category)
Trace logs the exchange before it goes to the next processing step using the specified logging category. |
TryType |
tryBlock()
Creates a try/catch block |
protected Processor |
wrapInErrorHandler(Processor processor)
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_TRACE_CATEGORY
Constructor Detail |
---|
public ProcessorType()
Method Detail |
---|
public abstract List<ProcessorType> getOutputs()
public abstract List<InterceptorType> getInterceptors()
public Processor createProcessor(RouteContext routeContext) throws Exception
Exception
public Processor createOutputsProcessor(RouteContext routeContext) throws Exception
Exception
public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception
Exception
public Processor wrapProcessor(RouteContext routeContext, Processor processor) throws Exception
Exception
public ProcessorType to(String uri)
public ProcessorType to(Endpoint endpoint)
public ProcessorType to(String... uris)
MulticastProcessor
pattern
public ProcessorType to(Endpoint... endpoints)
MulticastProcessor
pattern
public ProcessorType to(Collection<Endpoint> endpoints)
MulticastProcessor
pattern
public MulticastType multicast()
public ProcessorType 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
public ProcessorType 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
public ProcessorType 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
public IdempotentConsumerType idempotentConsumer(Expression messageIdExpression, MessageIdRepository messageIdRepository)
IdempotentConsumer
to avoid duplicate messages
public FilterType filter(Predicate predicate)
public ChoiceType choice()
public TryType tryBlock()
public ProcessorType recipientList(Expression receipients)
receipients
- is the builder of the expression used in the
RecipientList
to decide the destinationspublic SplitterType splitter(Expression receipients)
receipients
- the expression on which to split
public ResequencerType resequencer(Expression<Exchange> expression)
expression
- the expression on which to compare messages in order
public ResequencerType resequencer(List<Expression> expressions)
expressions
- the expressions on which to compare messages in order
public ResequencerType resequencer(Expression... expressions)
expressions
- the expressions on which to compare messages in order
public AggregatorType aggregator(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 AggregatorType aggregator(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")
public DelayerType delayer(Expression<Exchange> processAtExpression)
processAtExpression
- an expression to calculate the time at which
the messages should be processed
public DelayerType delayer(Expression<Exchange> processAtExpression, long delay)
processAtExpression
- an expression to calculate the time at which
the messages should be processeddelay
- the delay in milliseconds which is added to the
processAtExpression to determine the time the message
should be processed
public DelayerType delayer(long delay)
delay
- the default delay in milliseconds
public ThrottlerType throttler(long maximumRequestCount)
public ProcessorType interceptor(String ref)
public InterceptType intercept()
public ProcessorType proceed()
public ExceptionType exception(Class exceptionType)
public OtherwiseType intercept(Predicate predicate)
public ProcessorType interceptors(String... refs)
public FilterType filter(ExpressionType expression)
public FilterType filter(String language, String expression)
public ProcessorType trace()
DEFAULT_TRACE_CATEGORY
logging category.
public ProcessorType trace(String category)
category
- the logging category trace messages will sent to.
public PolicyRef policies()
public PolicyRef policy(Policy policy)
public ProcessorType intercept(DelegateProcessor interceptor)
public ProcessorType errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for
all child routes
public ProcessorType inheritErrorHandler(boolean condition)
condition
- the falg as to whether error handlers should be
inherited or not
public ProcessorType process(Processor processor)
public ProcessorType beanRef(String ref)
public ProcessorType beanRef(String ref, String method)
public ProcessorType setBody(Expression expression)
public ProcessorType setOutBody(Expression expression)
public ProcessorType setHeader(String name, Expression expression)
public ProcessorType setOutHeader(String name, Expression expression)
public ProcessorType setProperty(String name, Expression expression)
public ProcessorType convertBodyTo(Class type)
public ProcessorType convertOutBodyTo(Class type)
public ErrorHandlerBuilder getErrorHandlerBuilder()
public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
public boolean isInheritErrorHandler()
public Boolean getInheritErrorHandlerFlag()
public void setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)
protected Processor makeProcessor(RouteContext routeContext) throws Exception
Exception
protected Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target) throws Exception
routeContext
- target
- the processor which can be wrapped
Exception
protected Processor wrapInErrorHandler(Processor processor) throws Exception
Exception
protected ErrorHandlerBuilder createErrorHandlerBuilder()
protected void configureChild(ProcessorType output)
protected void addOutput(ProcessorType processorType)
protected Processor createCompositeProcessor(List<Processor> list)
Pipeline
but derived classes could change the
behaviour
protected Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorType> outputs) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |