public abstract class DefaultRoute extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.Route
Route.
Use the API from CamelContext to control the lifecycle of a route,
such as starting and stopping using the RouteController.startRoute(String)
and RouteController.stopRoute(String) methods.| Constructor and Description |
|---|
DefaultRoute(org.apache.camel.spi.RouteContext routeContext,
org.apache.camel.Endpoint endpoint) |
DefaultRoute(org.apache.camel.spi.RouteContext routeContext,
org.apache.camel.Endpoint endpoint,
org.apache.camel.Service... services) |
| Modifier and Type | Method and Description |
|---|---|
void |
addService(org.apache.camel.Service service) |
protected void |
addServices(List<org.apache.camel.Service> services)
Strategy method to allow derived classes to lazily load services for the route
|
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
String |
getDescription() |
org.apache.camel.Endpoint |
getEndpoint() |
String |
getGroup() |
String |
getId() |
Map<String,Object> |
getProperties() |
org.apache.camel.spi.RouteContext |
getRouteContext() |
List<org.apache.camel.Service> |
getServices() |
String |
getUptime() |
long |
getUptimeMillis() |
void |
onStartingServices(List<org.apache.camel.Service> services) |
void |
start()
Do not invoke this method directly, use
RouteController.startRoute(String) to start a route. |
void |
stop()
Do not invoke this method directly, use
RouteController.stopRoute(String) to stop a route. |
String |
toString() |
void |
warmUp() |
doInit, doResume, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, suspendpublic DefaultRoute(org.apache.camel.spi.RouteContext routeContext, org.apache.camel.Endpoint endpoint)
public DefaultRoute(org.apache.camel.spi.RouteContext routeContext, org.apache.camel.Endpoint endpoint, org.apache.camel.Service... services)
public long getUptimeMillis()
getUptimeMillis in interface org.apache.camel.Routepublic org.apache.camel.Endpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwarepublic org.apache.camel.spi.RouteContext getRouteContext()
getRouteContext in interface org.apache.camel.Routepublic Map<String,Object> getProperties()
getProperties in interface org.apache.camel.Routepublic String getDescription()
getDescription in interface org.apache.camel.Routepublic void onStartingServices(List<org.apache.camel.Service> services) throws Exception
onStartingServices in interface org.apache.camel.RouteExceptionpublic List<org.apache.camel.Service> getServices()
getServices in interface org.apache.camel.Routepublic void addService(org.apache.camel.Service service)
addService in interface org.apache.camel.Routepublic void warmUp()
warmUp in interface org.apache.camel.Routepublic void start() throws Exception
RouteController.startRoute(String) to start a route.start in interface org.apache.camel.Servicestart in class org.apache.camel.support.service.ServiceSupportExceptionpublic void stop() throws Exception
RouteController.stopRoute(String) to stop a route.stop in interface org.apache.camel.Servicestop in class org.apache.camel.support.service.ServiceSupportExceptionprotected void addServices(List<org.apache.camel.Service> services) throws Exception
Exceptionprotected void doStart() throws Exception
doStart in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doStop() throws Exception
doStop in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doShutdown() throws Exception
doShutdown in class org.apache.camel.support.service.ServiceSupportExceptionApache Camel