@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(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() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
List<OnCompletionDefinition> |
getOnCompletions() |
List<OnExceptionDefinition> |
getOnExceptions() |
List<RouteDefinition> |
getRoutes()
Returns the routes
|
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
|
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() |
description, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, id, idOrCreate, setCustomId, setDescription, setId
public String getLabel()
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 ModelCamelContext getCamelContext()
public void setCamelContext(ModelCamelContext camelContext)
public ErrorHandlerFactory getErrorHandlerBuilder()
public void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder)
public RouteDefinition route()
public RouteDefinition from(String uri)
uri
- the from uripublic RouteDefinition from(Endpoint endpoint)
endpoint
- the from endpointpublic RouteDefinition from(String... uris)
uris
- the from uripublic RouteDefinition from(Endpoint... endpoints)
endpoints
- the from endpointspublic RouteDefinition route(RouteDefinition route)
route
- the routepublic InterceptDefinition intercept()
public InterceptFromDefinition interceptFrom()
public InterceptFromDefinition interceptFrom(String uri)
uri
- uri of the endpointpublic InterceptSendToEndpointDefinition interceptSendToEndpoint(String uri)
uri
- uri of the endpointpublic OnExceptionDefinition onException(Class<? extends Throwable> exception)
exception
- the exceptionpublic OnCompletionDefinition onCompletion()
protected RouteDefinition createRoute()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.