|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.OptionalIdentifiedDefinition
org.apache.camel.model.ProcessorDefinition<RouteDefinition>
org.apache.camel.model.RouteDefinition
public class RouteDefinition
Represents an XML <route/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
errorHandlerBuilder, errorHandlerRef, inheritErrorHandler, log |
Constructor Summary | |
---|---|
RouteDefinition()
|
|
RouteDefinition(Endpoint endpoint)
|
|
RouteDefinition(String uri)
|
Method Summary | |
---|---|
List<RouteContext> |
addRoutes(CamelContext camelContext,
Collection<Route> routes)
|
protected RouteContext |
addRoutes(CamelContext camelContext,
Collection<Route> routes,
FromDefinition fromType)
|
RouteDefinition |
adviceWith(CamelContext camelContext,
RouteBuilder builder)
Advices this route with the route builder. |
RouteDefinition |
delayer(long delay)
Enable delayer for this route. |
RouteDefinition |
errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
Installs the given error handler builder. |
RouteDefinition |
from(Endpoint... endpoints)
Creates inputs to the route |
RouteDefinition |
from(Endpoint endpoint)
Creates an input to the route |
RouteDefinition |
from(String... uris)
Creates inputs to the route |
RouteDefinition |
from(String uri)
Creates an input to the route |
String |
getAutoStartup()
|
String |
getDelayer()
|
String |
getErrorHandlerRef()
|
String |
getGroup()
The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in the XML. |
String |
getHandleFault()
|
List<FromDefinition> |
getInputs()
|
List<ProcessorDefinition> |
getOutputs()
|
List<RoutePolicy> |
getRoutePolicies()
|
String |
getRoutePolicyRef()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
ShutdownRoute |
getShutdownRoute()
|
ShutdownRunningTask |
getShutdownRunningTask()
|
Integer |
getStartupOrder()
|
ServiceStatus |
getStatus(CamelContext camelContext)
Returns the status of the route if it has been registered with a CamelContext |
String |
getStreamCache()
|
String |
getTrace()
|
RouteDefinition |
group(String name)
Set the group name for this route |
RouteDefinition |
handleFault()
Enable handle fault for this route. |
boolean |
isAutoStartup(CamelContext camelContext)
|
boolean |
isOutputSupported()
|
boolean |
isStartable(CamelContext camelContext)
|
boolean |
isStoppable(CamelContext camelContext)
|
void |
markPrepared()
Marks the route definition as prepared. |
RouteDefinition |
noAutoStartup()
Disables this route from being auto started when Camel starts. |
RouteDefinition |
noDelayer()
Disable delayer for this route. |
RouteDefinition |
noHandleFault()
Disable handle fault for this route. |
RouteDefinition |
noStreamCaching()
Disable stream caching for this route. |
RouteDefinition |
noTracing()
Disable tracing for this route. |
void |
prepare(CamelContext context)
Prepares the route definition to be ready to be added to CamelContext |
Endpoint |
resolveEndpoint(CamelContext camelContext,
String uri)
|
RouteDefinition |
routeId(String id)
Set the route id for this route |
RouteDefinition |
routePolicy(RoutePolicy... policies)
Configures route policies for this route |
RouteDefinition |
routePolicyRef(String routePolicyRef)
Configures a route policy for this route |
void |
setAutoStartup(String autoStartup)
|
void |
setDelayer(String delayer)
|
void |
setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
Sets the error handler if one is not already set |
void |
setErrorHandlerRef(String errorHandlerRef)
Sets the bean ref name of the error handler builder to use on this route |
void |
setGroup(String group)
|
void |
setHandleFault(String handleFault)
|
void |
setInputs(List<FromDefinition> inputs)
|
void |
setOutputs(List<ProcessorDefinition> outputs)
|
void |
setRoutePolicies(List<RoutePolicy> routePolicies)
|
void |
setRoutePolicyRef(String routePolicyRef)
|
void |
setShutdownRoute(ShutdownRoute shutdownRoute)
|
void |
setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
|
void |
setStartupOrder(Integer startupOrder)
|
void |
setStreamCache(String streamCache)
|
void |
setTrace(String trace)
|
RouteDefinition |
shutdownRoute(ShutdownRoute shutdownRoute)
Configures a shutdown route option. |
RouteDefinition |
shutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
Configures a shutdown running task option. |
RouteDefinition |
startupOrder(int order)
Configures the startup order for this route Camel will reorder routes and star them ordered by 0..N where 0 is the lowest number and N the highest number. |
RouteDefinition |
streamCaching()
Enable stream caching for this route. |
String |
toString()
|
RouteDefinition |
tracing()
Enable tracing for this route. |
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition |
---|
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RouteDefinition()
public RouteDefinition(String uri)
public RouteDefinition(Endpoint endpoint)
Method Detail |
---|
public void prepare(CamelContext context)
CamelContext
context
- the camel contextpublic void markPrepared()
public String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in class OptionalIdentifiedDefinition
public ServiceStatus getStatus(CamelContext camelContext)
CamelContext
public boolean isStartable(CamelContext camelContext)
public boolean isStoppable(CamelContext camelContext)
public List<RouteContext> addRoutes(CamelContext camelContext, Collection<Route> routes) throws Exception
Exception
public Endpoint resolveEndpoint(CamelContext camelContext, String uri) throws NoSuchEndpointException
NoSuchEndpointException
public RouteDefinition adviceWith(CamelContext camelContext, RouteBuilder builder) throws Exception
RouteBuilder
but the specialized AdviceWithRouteBuilder
has additional features when using the advice with feature.
We therefore suggest you to use the AdviceWithRouteBuilder
.
The advice process will add the interceptors, on exceptions, on completions etc. configured
from the route builder to this route.
This is mostly used for testing purpose to add interceptors and the likes to an existing route.
Will stop and remove the old route from camel context and add and start this new advised route.
camelContext
- the camel contextbuilder
- the route builder
Exception
- can be thrown from the route builderAdviceWithRouteBuilder
public RouteDefinition from(String uri)
uri
- the from uri
public RouteDefinition from(Endpoint endpoint)
endpoint
- the from endpoint
public RouteDefinition from(String... uris)
uris
- the from uris
public RouteDefinition from(Endpoint... endpoints)
endpoints
- the from endpoints
public RouteDefinition group(String name)
name
- the group name
public RouteDefinition routeId(String id)
routeId
in class ProcessorDefinition<RouteDefinition>
id
- the route id
public RouteDefinition noStreamCaching()
public RouteDefinition streamCaching()
public RouteDefinition noTracing()
public RouteDefinition tracing()
public RouteDefinition noHandleFault()
public RouteDefinition handleFault()
public RouteDefinition noDelayer()
public RouteDefinition delayer(long delay)
delay
- delay in millis
public RouteDefinition errorHandler(ErrorHandlerBuilder errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for all child routes
public RouteDefinition noAutoStartup()
public RouteDefinition startupOrder(int order)
order
- the order represented as a number
public RouteDefinition routePolicy(RoutePolicy... policies)
policies
- the route policies
public RouteDefinition routePolicyRef(String routePolicyRef)
routePolicyRef
- reference to a RoutePolicy
to lookup and use.
You can specify multiple references by separating using comma.
public RouteDefinition shutdownRoute(ShutdownRoute shutdownRoute)
shutdownRoute
- the option to use when shutting down this route
public RouteDefinition shutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
shutdownRunningTask
- the option to use when shutting down and how to act upon running tasks.
public List<FromDefinition> getInputs()
public void setInputs(List<FromDefinition> inputs)
public List<ProcessorDefinition> getOutputs()
getOutputs
in class ProcessorDefinition<RouteDefinition>
public void setOutputs(List<ProcessorDefinition> outputs)
public boolean isOutputSupported()
isOutputSupported
in class ProcessorDefinition<RouteDefinition>
public String getGroup()
public void setGroup(String group)
public String getStreamCache()
public void setStreamCache(String streamCache)
public String getTrace()
public void setTrace(String trace)
public String getHandleFault()
public void setHandleFault(String handleFault)
public String getDelayer()
public void setDelayer(String delayer)
public String getAutoStartup()
public boolean isAutoStartup(CamelContext camelContext) throws Exception
Exception
public void setAutoStartup(String autoStartup)
public Integer getStartupOrder()
public void setStartupOrder(Integer startupOrder)
public void setErrorHandlerRef(String errorHandlerRef)
public String getErrorHandlerRef()
public void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
public void setRoutePolicyRef(String routePolicyRef)
public String getRoutePolicyRef()
public List<RoutePolicy> getRoutePolicies()
public void setRoutePolicies(List<RoutePolicy> routePolicies)
public ShutdownRoute getShutdownRoute()
public void setShutdownRoute(ShutdownRoute shutdownRoute)
public ShutdownRunningTask getShutdownRunningTask()
public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
protected RouteContext addRoutes(CamelContext camelContext, Collection<Route> routes, FromDefinition fromType) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |