@Metadata(label="configuration") public class RoutesDefinition extends OptionalIdentifiedDefinition<RoutesDefinition> implements RouteContainer
Constructor and Description |
---|
RoutesDefinition() |
Modifier and Type | Method and Description |
---|---|
protected RouteDefinition |
createRoute() |
RouteDefinition |
from(org.apache.camel.Endpoint endpoint)
Creates a new route from the given endpoint
|
RouteDefinition |
from(EndpointConsumerBuilder endpoint) |
RouteDefinition |
from(String uri)
Creates a new route from the given URI input
|
org.apache.camel.CamelContext |
getCamelContext() |
org.apache.camel.ErrorHandlerFactory |
getErrorHandlerFactory() |
List<InterceptFromDefinition> |
getInterceptFroms() |
List<InterceptDefinition> |
getIntercepts() |
List<InterceptSendToEndpointDefinition> |
getInterceptSendTos() |
String |
getLabel() |
List<OnCompletionDefinition> |
getOnCompletions() |
List<OnExceptionDefinition> |
getOnExceptions() |
List<RouteDefinition> |
getRoutes()
Returns the routes
|
String |
getShortName() |
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<? extends Throwable> exception)
Adds an on exception
|
RouteDefinition |
route()
Creates a new route
Prefer to use the from methods when creating a new route.
|
RouteDefinition |
route(RouteDefinition route)
Creates a new route using the given route.
|
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory) |
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() |
description, description, getCustomId, getDescription, getDescriptionText, getId, getParent, hasCustomIdAssigned, id, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
public String getLabel()
getLabel
in interface org.apache.camel.NamedNode
public List<RouteDefinition> getRoutes()
RouteContainer
getRoutes
in interface RouteContainer
public void setRoutes(List<RouteDefinition> routes)
RouteContainer
setRoutes
in interface RouteContainer
routes
- the routespublic List<InterceptFromDefinition> getInterceptFroms()
public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
public List<InterceptSendToEndpointDefinition> getInterceptSendTos()
public void setInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos)
public List<InterceptDefinition> getIntercepts()
public void setIntercepts(List<InterceptDefinition> intercepts)
public List<OnExceptionDefinition> getOnExceptions()
public void setOnExceptions(List<OnExceptionDefinition> onExceptions)
public List<OnCompletionDefinition> getOnCompletions()
public void setOnCompletions(List<OnCompletionDefinition> onCompletions)
public org.apache.camel.CamelContext getCamelContext()
public void setCamelContext(org.apache.camel.CamelContext camelContext)
public org.apache.camel.ErrorHandlerFactory getErrorHandlerFactory()
public void setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
public RouteDefinition route()
public RouteDefinition from(@AsEndpointUri String uri)
uri
- the from uripublic RouteDefinition from(org.apache.camel.Endpoint endpoint)
endpoint
- the from endpointpublic RouteDefinition from(EndpointConsumerBuilder endpoint)
public RouteDefinition route(RouteDefinition route)
route
- the routepublic InterceptDefinition intercept()
public InterceptFromDefinition interceptFrom()
public InterceptFromDefinition interceptFrom(@AsEndpointUri String uri)
uri
- uri of the endpointpublic InterceptSendToEndpointDefinition interceptSendToEndpoint(@AsEndpointUri String uri)
uri
- uri of the endpointpublic OnExceptionDefinition onException(Class<? extends Throwable> exception)
exception
- the exceptionpublic OnCompletionDefinition onCompletion()
protected RouteDefinition createRoute()
Apache Camel