|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.builder.BuilderSupport org.apache.camel.builder.RouteBuilder
public abstract class RouteBuilder
A Java DSL which is
used to build Route
instances in a CamelContext
for smart routing.
Constructor Summary | |
---|---|
RouteBuilder()
|
|
RouteBuilder(CamelContext context)
|
Method Summary | |
---|---|
protected void |
addRoutes(Routes routes)
|
protected void |
checkInitialized()
|
abstract void |
configure()
Called on initialization to to build the required destinationBuilders |
protected void |
configureRoute(RouteType route)
|
protected CamelContext |
createContainer()
Factory method |
RouteBuilder |
errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
Installs the given error handler builder |
ExceptionType |
exception(Class exceptionType)
Deprecated. Please use onException(Class) instead. Will be removed in Camel 2.0. |
RouteType |
from(Endpoint endpoint)
Creates a new route from the given endpoint |
RouteType |
from(String uri)
Creates a new route from the given URI input |
CamelContext |
getContext()
Gets the Camel context used. |
RoutesType |
getRouteCollection()
|
List<Route> |
getRouteList()
Uses CamelContext.getRoutes() to return the routes in the context. |
RouteBuilder |
inheritErrorHandler(boolean value)
Configures whether or not the error handler is inherited by every processing node (or just the top most one) |
InterceptType |
intercept()
Adds a route for an interceptor; use the ProcessorType.proceed() method
to continue processing the underlying route being intercepted. |
RouteBuilder |
intercept(DelegateProcessor interceptor)
Adds the given interceptor to this route |
ChoiceType |
intercept(Predicate predicate)
Applies a route for an interceptor if the given predicate is true otherwise the interceptor route is not applied |
void |
noStreamCaching()
Completely disable stream caching for all routes being defined in the same RouteBuilder after this. |
ExceptionType |
onException(Class... exceptions)
Adds an exception handler route for the given exception types |
ExceptionType |
onException(Class exceptionType)
Adds an exception handler route for the given exception type |
protected void |
populateRoutes(List<Route> routes)
|
void |
setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
Sets the error handler to use with processors created by this builder |
void |
setInheritErrorHandler(boolean inheritErrorHandler)
|
void |
setRouteCollection(RoutesType routeCollection)
|
void |
streamCaching()
Enable stream caching for all routes being defined in the same RouteBuilder after this call. |
String |
toString()
|
Methods inherited from class org.apache.camel.builder.BuilderSupport |
---|
body, body, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, deadLetterChannel, endpoint, endpoint, endpoints, endpoints, faultBody, faultBodyAs, getErrorHandlerBuilder, header, isInheritErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, property, regexReplaceAll, regexReplaceAll, setContext, systemProperty, systemProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.camel.Routes |
---|
setContext |
Constructor Detail |
---|
public RouteBuilder()
public RouteBuilder(CamelContext context)
Method Detail |
---|
public String toString()
toString
in class Object
public abstract void configure() throws Exception
Exception
public RouteType from(String uri)
public RouteType from(Endpoint endpoint)
public RouteBuilder errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for
all child routes
public RouteBuilder inheritErrorHandler(boolean value)
value
- the flag as to whether error handlers should be inherited or not
public RouteBuilder intercept(DelegateProcessor interceptor)
public InterceptType intercept()
ProcessorType.proceed()
method
to continue processing the underlying route being intercepted.
public ChoiceType intercept(Predicate predicate)
public ExceptionType onException(Class exceptionType)
public ExceptionType onException(Class... exceptions)
public ExceptionType exception(Class exceptionType)
onException(Class)
instead. Will be removed in Camel 2.0.
public CamelContext getContext()
Routes
getContext
in interface Routes
getContext
in class BuilderSupport
public List<Route> getRouteList() throws Exception
CamelContext.getRoutes()
to return the routes in the context.
getRouteList
in interface Routes
Exception
public void setInheritErrorHandler(boolean inheritErrorHandler)
setInheritErrorHandler
in class BuilderSupport
public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
BuilderSupport
setErrorHandlerBuilder
in class BuilderSupport
protected void checkInitialized() throws Exception
Exception
protected void populateRoutes(List<Route> routes) throws Exception
Exception
public void setRouteCollection(RoutesType routeCollection)
public RoutesType getRouteCollection()
public void noStreamCaching()
public void streamCaching()
protected CamelContext createContainer()
protected void configureRoute(RouteType route)
protected void addRoutes(Routes routes) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |