org.apache.camel.model
Class RoutesDefinition

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

public class RoutesDefinition
extends OptionalIdentifiedDefinition<RoutesDefinition>
implements RouteContainer

Represents a collection of routes

Version:

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
 ModelCamelContext getCamelContext()
           
 ErrorHandlerFactory getErrorHandlerBuilder()
           
 List<InterceptFromDefinition> getInterceptFroms()
           
 List<InterceptDefinition> getIntercepts()
           
 List<InterceptSendToEndpointDefinition> getInterceptSendTos()
           
 List<OnCompletionDefinition> getOnCompletions()
           
 List<OnExceptionDefinition> getOnExceptions()
           
 List<RouteDefinition> getRoutes()
          Returns the routes
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 InterceptDefinition intercept()
          Creates and adds an interceptor that is triggered on every step in the route processing.
 InterceptFromDefinition interceptFrom()
          Creates and adds an interceptor that is triggered when an exchange is received as input to any routes (eg from all the from)
 InterceptFromDefinition interceptFrom(String uri)
          Creates and adds an interceptor that is triggered when an exchange is received as input to the route defined with the given endpoint (eg from the from)
 InterceptSendToEndpointDefinition interceptSendToEndpoint(String uri)
          Creates and adds an interceptor that is triggered when an exchange is send to the given endpoint
 OnCompletionDefinition onCompletion()
          Adds an on completion
 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(ModelCamelContext camelContext)
           
 void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder)
           
 void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
           
 void setIntercepts(List<InterceptDefinition> intercepts)
           
 void setInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos)
           
 void setOnCompletions(List<OnCompletionDefinition> onCompletions)
           
 void setOnExceptions(List<OnExceptionDefinition> onExceptions)
           
 void setRoutes(List<RouteDefinition> routes)
          Sets the routes to use
 String toString()
           
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, id, 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

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedDefinition
Returns a short name for this node which can be useful for ID generation or referring to related resources like images

Specified by:
getShortName in interface NamedNode
Overrides:
getShortName in class OptionalIdentifiedDefinition<RoutesDefinition>
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

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

getInterceptFroms

public List<InterceptFromDefinition> getInterceptFroms()

setInterceptFroms

public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)

getInterceptSendTos

public List<InterceptSendToEndpointDefinition> getInterceptSendTos()

setInterceptSendTos

public void setInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos)

getIntercepts

public List<InterceptDefinition> getIntercepts()

setIntercepts

public void setIntercepts(List<InterceptDefinition> intercepts)

getOnExceptions

public List<OnExceptionDefinition> getOnExceptions()

setOnExceptions

public void setOnExceptions(List<OnExceptionDefinition> onExceptions)

getOnCompletions

public List<OnCompletionDefinition> getOnCompletions()

setOnCompletions

public void setOnCompletions(List<OnCompletionDefinition> onCompletions)

getCamelContext

public ModelCamelContext getCamelContext()

setCamelContext

public void setCamelContext(ModelCamelContext camelContext)

getErrorHandlerBuilder

public ErrorHandlerFactory getErrorHandlerBuilder()

setErrorHandlerBuilder

public void setErrorHandlerBuilder(ErrorHandlerFactory 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 InterceptDefinition intercept()
Creates and adds an interceptor that is triggered on every step in the route processing.

Returns:
the interceptor builder to configure

interceptFrom

public InterceptFromDefinition interceptFrom()
Creates and adds an interceptor that is triggered when an exchange is received as input to any routes (eg from all the from)

Returns:
the interceptor builder to configure

interceptFrom

public InterceptFromDefinition interceptFrom(String uri)
Creates and adds an interceptor that is triggered when an exchange is received as input to the route defined with the given endpoint (eg from the from)

Parameters:
uri - uri of the endpoint
Returns:
the interceptor builder to configure

interceptSendToEndpoint

public InterceptSendToEndpointDefinition interceptSendToEndpoint(String uri)
Creates and adds an interceptor that is triggered when an exchange is send to the given endpoint

Parameters:
uri - uri of the endpoint
Returns:
the builder

onException

public OnExceptionDefinition onException(Class exception)
Adds an on exception

Parameters:
exception - the exception
Returns:
the builder

onCompletion

public OnCompletionDefinition onCompletion()
Adds an on completion

Returns:
the builder

createRoute

protected RouteDefinition createRoute()


Apache CAMEL