org.apache.camel.model
Class RoutesDefinition

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedType<RoutesDefinition>
      extended by org.apache.camel.model.RoutesDefinition
All Implemented Interfaces:
RouteContainer

public class RoutesDefinition
extends OptionalIdentifiedType<RoutesDefinition>
implements RouteContainer

Represents a collection of routes

Version:
$Revision: 751357 $

Field Summary
 
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType
nodeCounters
 
Constructor Summary
RoutesDefinition()
           
 
Method Summary
protected  RouteDefinition createRoute()
           
 RouteDefinition from(Endpoint... endpoints)
          Creates a new route from the given endpoints
 RouteDefinition from(Endpoint endpoint)
          Creates a new route from the given endpoint
 RouteDefinition from(String... uris)
          Creates a new route from the given URI inputs
 RouteDefinition from(String uri)
          Creates a new route from the given URI input
 CamelContext getCamelContext()
           
 ErrorHandlerBuilder getErrorHandlerBuilder()
           
 List<OnExceptionDefinition> getExceptions()
           
 Boolean getInheritErrorHandlerFlag()
           
 List<AbstractInterceptorDefinition> getInterceptors()
           
 List<InterceptDefinition> getIntercepts()
           
 List<RouteDefinition> getRoutes()
          Returns the routes
 InterceptDefinition intercept()
          Creates and adds an interceptor
 RoutesDefinition intercept(DelegateProcessor interceptor)
          Adds an interceptor
 ChoiceDefinition intercept(Predicate predicate)
          Creates and adds an interceptor that is attached with a predicate
 boolean isInheritErrorHandler()
           
 OnExceptionDefinition onException(Class exception)
          Adds an on exception
 RouteDefinition route()
          Creates a new route
 RouteDefinition route(RouteDefinition route)
          Creates a new route using the given route
 void setCamelContext(CamelContext camelContext)
           
 void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
           
 void setExceptions(List<OnExceptionDefinition> exceptions)
           
 void setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)
           
 void setInterceptors(List<AbstractInterceptorDefinition> interceptors)
           
 void setIntercepts(List<InterceptDefinition> intercepts)
           
 void setRoutes(List<RouteDefinition> routes)
          Sets the routes to use
 String toString()
           
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedType
createId, description, getDescription, getId, getNodeCounter, getShortName, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutesDefinition

public RoutesDefinition()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getRoutes

public List<RouteDefinition> getRoutes()
Description copied from interface: RouteContainer
Returns the routes

Specified by:
getRoutes in interface RouteContainer
Returns:
the routes

setRoutes

public void setRoutes(List<RouteDefinition> routes)
Description copied from interface: RouteContainer
Sets the routes to use

Specified by:
setRoutes in interface RouteContainer
Parameters:
routes - the routes

getInterceptors

public List<AbstractInterceptorDefinition> getInterceptors()

setInterceptors

public void setInterceptors(List<AbstractInterceptorDefinition> interceptors)

getIntercepts

public List<InterceptDefinition> getIntercepts()

setIntercepts

public void setIntercepts(List<InterceptDefinition> intercepts)

getExceptions

public List<OnExceptionDefinition> getExceptions()

setExceptions

public void setExceptions(List<OnExceptionDefinition> exceptions)

getCamelContext

public CamelContext getCamelContext()

setCamelContext

public void setCamelContext(CamelContext camelContext)

isInheritErrorHandler

public boolean isInheritErrorHandler()

getInheritErrorHandlerFlag

public Boolean getInheritErrorHandlerFlag()

setInheritErrorHandlerFlag

public void setInheritErrorHandlerFlag(Boolean inheritErrorHandlerFlag)

getErrorHandlerBuilder

public ErrorHandlerBuilder getErrorHandlerBuilder()

setErrorHandlerBuilder

public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)

route

public RouteDefinition route()
Creates a new route

Returns:
the builder

from

public RouteDefinition from(String uri)
Creates a new route from the given URI input

Parameters:
uri - the from uri
Returns:
the builder

from

public RouteDefinition from(Endpoint endpoint)
Creates a new route from the given endpoint

Parameters:
endpoint - the from endpoint
Returns:
the builder

from

public RouteDefinition from(String... uris)
Creates a new route from the given URI inputs

Parameters:
uris - the from uri
Returns:
the builder

from

public RouteDefinition from(Endpoint... endpoints)
Creates a new route from the given endpoints

Parameters:
endpoints - the from endpoints
Returns:
the builder

route

public RouteDefinition route(RouteDefinition route)
Creates a new route using the given route

Parameters:
route - the route
Returns:
the builder

intercept

public RoutesDefinition intercept(DelegateProcessor interceptor)
Adds an interceptor

Parameters:
interceptor - the interceptor
Returns:
the builder

intercept

public InterceptDefinition intercept()
Creates and adds an interceptor

Returns:
the interceptor builder to configure

intercept

public ChoiceDefinition intercept(Predicate predicate)
Creates and adds an interceptor that is attached with a predicate

Parameters:
predicate - the predicate
Returns:
the builder

onException

public OnExceptionDefinition onException(Class exception)
Adds an on exception

Parameters:
exception - the exception
Returns:
the builder

createRoute

protected RouteDefinition createRoute()


Copyright © 2009 Apache Software Foundation. All Rights Reserved.