|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.OptionalIdentifiedDefinition org.apache.camel.model.ProcessorDefinition<ProcessorDefinition> 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, log |
Constructor Summary | |
---|---|
RouteDefinition()
|
|
RouteDefinition(Endpoint endpoint)
|
|
RouteDefinition(String uri)
|
Method Summary | |
---|---|
List<RouteContext> |
addRoutes(CamelContext context,
Collection<Route> routes)
|
protected RouteContext |
addRoutes(Collection<Route> routes,
FromDefinition fromType)
|
RouteDefinition |
adviceWith(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 |
CamelContext |
getCamelContext()
Get the CamelContext |
Long |
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. |
List<FromDefinition> |
getInputs()
|
List<ProcessorDefinition> |
getOutputs()
|
RoutePolicy |
getRoutePolicy()
|
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()
Returns the status of the route if it has been registered with a CamelContext |
RouteDefinition |
group(String name)
Set the group name for this route |
RouteDefinition |
handleFault()
Enable handle fault for this route. |
Boolean |
isAutoStartup()
|
Boolean |
isHandleFault()
|
boolean |
isStartable()
|
boolean |
isStoppable()
|
Boolean |
isStreamCache()
|
Boolean |
isTrace()
|
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. |
Endpoint |
resolveEndpoint(String uri)
|
RouteDefinition |
routeId(String id)
Set the route id for this route |
RouteDefinition |
routePolicy(RoutePolicy routePolicy)
Disables this route from being auto started when Camel starts. |
RouteDefinition |
routePolicyRef(String routePolicyRef)
Configures a route policy for this route |
void |
setAutoStartup(Boolean autoStartup)
|
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
void |
setDelayer(Long delayer)
|
protected 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(Boolean handleFault)
|
void |
setInputs(List<FromDefinition> inputs)
|
void |
setOutputs(List<ProcessorDefinition> outputs)
|
void |
setRoutePolicy(RoutePolicy routePolicy)
|
void |
setRoutePolicyRef(String routePolicyRef)
|
void |
setShutdownRoute(ShutdownRoute shutdownRoute)
|
void |
setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
|
void |
setStartupOrder(Integer startupOrder)
|
void |
setStreamCache(Boolean streamCache)
|
void |
setTrace(Boolean 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, 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 String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in class OptionalIdentifiedDefinition
public ServiceStatus getStatus()
CamelContext
public boolean isStartable()
public boolean isStoppable()
public List<RouteContext> addRoutes(CamelContext context, Collection<Route> routes) throws Exception
Exception
public Endpoint resolveEndpoint(String uri) throws NoSuchEndpointException
NoSuchEndpointException
public RouteDefinition adviceWith(RouteBuilder builder) throws Exception
builder
- the route builder
Exception
- can be thrown from the route builderpublic 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<ProcessorDefinition>
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 millispublic 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 routePolicy)
public RouteDefinition routePolicyRef(String routePolicyRef)
routePolicyRef
- reference to a RoutePolicy
to lookup and use.public RouteDefinition shutdownRoute(ShutdownRoute shutdownRoute)
shutdownRoute
- the option to use when shutting down this routepublic 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<ProcessorDefinition>
public void setOutputs(List<ProcessorDefinition> outputs)
public CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic String getGroup()
public void setGroup(String group)
public Boolean isStreamCache()
public void setStreamCache(Boolean streamCache)
public Boolean isTrace()
public void setTrace(Boolean trace)
public Boolean isHandleFault()
public void setHandleFault(Boolean handleFault)
public Long getDelayer()
public void setDelayer(Long delayer)
public Boolean isAutoStartup()
public void setAutoStartup(Boolean autoStartup)
public Integer getStartupOrder()
public void setStartupOrder(Integer startupOrder)
public void setErrorHandlerRef(String errorHandlerRef)
public String getErrorHandlerRef()
protected void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder)
public void setRoutePolicyRef(String routePolicyRef)
public String getRoutePolicyRef()
public void setRoutePolicy(RoutePolicy routePolicy)
public RoutePolicy getRoutePolicy()
public ShutdownRoute getShutdownRoute()
public void setShutdownRoute(ShutdownRoute shutdownRoute)
public ShutdownRunningTask getShutdownRunningTask()
public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
protected RouteContext addRoutes(Collection<Route> routes, FromDefinition fromType) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |