|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.builder.BuilderSupport
org.apache.camel.builder.FromBuilder
public class FromBuilder
Field Summary | |
---|---|
static String |
DEFAULT_TRACE_CATEGORY
|
Constructor Summary | |
---|---|
FromBuilder(FromBuilder parent)
|
|
FromBuilder(RouteBuilder builder,
Endpoint from)
|
Method Summary | |
---|---|
ProcessorFactory |
addProcessBuilder(ProcessorFactory processFactory)
|
void |
addProcessor(Processor processor)
|
protected void |
addProcessorBuilder(Processor processor)
|
ChoiceBuilder |
choice()
Creates a choice of one or more predicates with an otherwise clause |
FromBuilder |
convertBodyTo(Class type)
Converts the IN message body to the specified type |
FromBuilder |
convertOutBodyTo(Class type)
Converts the OUT message body to the specified type |
Processor |
createProcessor()
|
Route |
createRoute()
|
FromBuilder |
errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
Installs the given error handler builder |
FilterBuilder |
filter(Predicate predicate)
Creates a predicate which is applied and only if it is true then the exchange is forwarded to the destination |
RouteBuilder |
getBuilder()
|
Endpoint |
getFrom()
|
List<Processor> |
getProcessors()
|
protected FromBuilder |
getRouteBuilder()
|
IdempotentConsumerBuilder |
idempotentConsumer(Expression messageIdExpression,
MessageIdRepository messageIdRepository)
Creates an IdempotentConsumer to avoid duplicate messages |
FromBuilder |
inheritErrorHandler(boolean condition)
Configures whether or not the error handler is inherited by every processing node (or just the top most one) |
InterceptorBuilder |
intercept()
|
FromBuilder |
intercept(DelegateProcessor interceptor)
|
protected Processor |
makeProcessor(ProcessorFactory processFactory)
Creates the processor and wraps it in any necessary interceptors and error handlers |
ProcessorFactory |
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 |
ProcessorFactory |
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 |
ProcessorFactory |
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 |
PolicyBuilder |
policies()
|
FromBuilder |
policy(Policy policy)
|
FromBuilder |
process(Processor processor)
Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline |
RecipientListBuilder |
recipientList(Expression receipients)
Creates a dynamic Recipient List pattern. |
ResequencerBuilder |
resequencer(Expression<Exchange>... 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. |
ResequencerBuilder |
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. |
ResequencerBuilder |
resequencer(List<Expression<Exchange>> 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. |
FromBuilder |
setBody(Expression expression)
Adds a processor which sets the body on the IN message |
FromBuilder |
setHeader(String name,
Expression expression)
Adds a processor which sets the header on the IN message |
FromBuilder |
setOutBody(Expression expression)
Adds a processor which sets the body on the OUT message |
FromBuilder |
setOutHeader(String name,
Expression expression)
Adds a processor which sets the header on the OUT message |
FromBuilder |
setProperty(String name,
Expression expression)
Adds a processor which sets the exchange property |
protected void |
setRouteBuilder(FromBuilder routeBuilder)
|
SplitterBuilder |
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. |
ProcessorFactory |
to(Collection<Endpoint> endpoints)
Sends the exchange to a list of endpoint using the MulticastProcessor pattern |
ProcessorFactory |
to(Endpoint... endpoints)
Sends the exchange to a list of endpoints using the MulticastProcessor pattern |
ProcessorFactory |
to(Endpoint endpoint)
Sends the exchange to the given endpoint |
ProcessorFactory |
to(String... uris)
Sends the exchange to a list of endpoints using the MulticastProcessor pattern |
ProcessorFactory |
to(String uri)
Sends the exchange to the given endpoint URI |
FromBuilder |
trace()
Trace logs the exchange before it goes to the next processing step using the DEFAULT_TRACE_CATEGORY logging
category. |
FromBuilder |
trace(String category)
Trace logs the exchange before it goes to the next processing step using the specified logging category. |
protected Processor |
wrapInErrorHandler(Processor processor)
A strategy method to allow newly created processors to be wrapped in an error handler. |
protected Processor |
wrapProcessor(Processor processor)
A strategy method which allows derived classes to wrap the child processor in some kind of interceptor such as a filter for the IdempotentConsumerBuilder . |
Methods inherited from class org.apache.camel.builder.BuilderSupport |
---|
body, bodyAs, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, deadLetterChannel, endpoint, endpoints, endpoints, getContext, getErrorHandlerBuilder, header, isInheritErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, setContext, setErrorHandlerBuilder, setInheritErrorHandler, systemProperty, systemProperty |
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 FromBuilder(RouteBuilder builder, Endpoint from)
public FromBuilder(FromBuilder parent)
Method Detail |
---|
public ProcessorFactory to(String uri)
public ProcessorFactory to(Endpoint endpoint)
public ProcessorFactory to(String... uris)
MulticastProcessor
pattern
public ProcessorFactory to(Endpoint... endpoints)
MulticastProcessor
pattern
public ProcessorFactory to(Collection<Endpoint> endpoints)
MulticastProcessor
pattern
public ProcessorFactory 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 ProcessorFactory 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 ProcessorFactory 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 IdempotentConsumerBuilder idempotentConsumer(Expression messageIdExpression, MessageIdRepository messageIdRepository)
IdempotentConsumer
to avoid duplicate messages
public FilterBuilder filter(Predicate predicate)
public ChoiceBuilder choice()
public RecipientListBuilder recipientList(Expression receipients)
receipients
- is the builder of the expression used in the RecipientList
to decide the destinationspublic SplitterBuilder splitter(Expression receipients)
receipients
- the expression on which to split
public ResequencerBuilder resequencer(Expression<Exchange> expression)
expression
- the expression on which to compare messages in order
public ResequencerBuilder resequencer(List<Expression<Exchange>> expressions)
expressions
- the expressions on which to compare messages in order
public ResequencerBuilder resequencer(Expression<Exchange>... expressions)
expressions
- the expressions on which to compare messages in order
public FromBuilder errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for all child routes
public FromBuilder inheritErrorHandler(boolean condition)
condition
- the falg as to whether error handlers should be inherited or not
public InterceptorBuilder intercept()
public FromBuilder trace()
DEFAULT_TRACE_CATEGORY
logging
category.
public FromBuilder trace(String category)
category
- the logging category trace messages will sent to.
public FromBuilder intercept(DelegateProcessor interceptor)
public PolicyBuilder policies()
public FromBuilder policy(Policy policy)
public FromBuilder process(Processor processor)
public FromBuilder setBody(Expression expression)
public FromBuilder setOutBody(Expression expression)
public FromBuilder setHeader(String name, Expression expression)
public FromBuilder setOutHeader(String name, Expression expression)
public FromBuilder setProperty(String name, Expression expression)
public FromBuilder convertBodyTo(Class type)
public FromBuilder convertOutBodyTo(Class type)
public RouteBuilder getBuilder()
public Endpoint getFrom()
public List<Processor> getProcessors()
public ProcessorFactory addProcessBuilder(ProcessorFactory processFactory)
protected void addProcessorBuilder(Processor processor)
public void addProcessor(Processor processor)
public Route createRoute() throws Exception
Exception
public Processor createProcessor() throws Exception
createProcessor
in interface ProcessorFactory
Exception
protected Processor makeProcessor(ProcessorFactory processFactory) throws Exception
Exception
protected Processor wrapInErrorHandler(Processor processor) throws Exception
IdempotentConsumerBuilder
which will rely on the
FromBuilder
to perform the error handling to avoid doubly-wrapped processors with 2 nested error handlers
Exception
protected Processor wrapProcessor(Processor processor)
IdempotentConsumerBuilder
.
processor
- the processor which can be wrapped
protected FromBuilder getRouteBuilder()
protected void setRouteBuilder(FromBuilder routeBuilder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |