org.apache.camel.builder
Class RouteBuilder

java.lang.Object
  extended by org.apache.camel.builder.BuilderSupport
      extended by org.apache.camel.builder.RouteBuilder
Direct Known Subclasses:
NoRouteBuilder

public abstract class RouteBuilder
extends BuilderSupport

A Java DSL which is used to build Route instances in a @{link CamelContext} for smart routing.

Version:
$Revision: 541693 $

Constructor Summary
protected RouteBuilder()
           
protected RouteBuilder(CamelContext context)
           
 
Method Summary
 void addFromBuilder(FromBuilder answer)
           
protected  void checkInitialized()
           
abstract  void configure()
          Called on initialization to to build the required destinationBuilders
protected  CamelContext createContainer()
          Factory method
 RouteBuilder errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
          Installs the given error handler builder
 FromBuilder from(Endpoint endpoint)
           
 FromBuilder from(String uri)
           
 CamelContext getContext()
           
 List<FromBuilder> getFromBuilders()
          Returns the builders which have been created
 List<Route> getRouteList()
          Returns the routing map from inbound endpoints to processors
 RouteBuilder inheritErrorHandler(boolean value)
          Configures whether or not the error handler is inherited by every processing node (or just the top most one)
protected  void populateRoutes(List<Route> routes)
           
 
Methods inherited from class org.apache.camel.builder.BuilderSupport
body, bodyAs, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, deadLetterChannel, endpoint, endpoints, endpoints, 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
 

Constructor Detail

RouteBuilder

protected RouteBuilder()

RouteBuilder

protected RouteBuilder(CamelContext context)
Method Detail

configure

public abstract void configure()
                        throws Exception
Called on initialization to to build the required destinationBuilders

Throws:
Exception

from

public FromBuilder from(String uri)

from

public FromBuilder from(Endpoint endpoint)

errorHandler

public RouteBuilder 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 RouteBuilder inheritErrorHandler(boolean value)
Configures whether or not the error handler is inherited by every processing node (or just the top most one)

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

getContext

public CamelContext getContext()
Overrides:
getContext in class BuilderSupport

getRouteList

public List<Route> getRouteList()
                         throws Exception
Returns the routing map from inbound endpoints to processors

Throws:
Exception

getFromBuilders

public List<FromBuilder> getFromBuilders()
                                  throws Exception
Returns the builders which have been created

Throws:
Exception

addFromBuilder

public void addFromBuilder(FromBuilder answer)

checkInitialized

protected void checkInitialized()
                         throws Exception
Throws:
Exception

populateRoutes

protected void populateRoutes(List<Route> routes)
                       throws Exception
Throws:
Exception

createContainer

protected CamelContext createContainer()
Factory method



Copyright © 2007 Apache Software Foundation. All Rights Reserved.