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() |
org.apache.camel.CamelContext |
getCamelContext() |
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() |
build, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public 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 String getId()
getId
in interface org.apache.camel.Route
public String getGroup()
getGroup
in interface org.apache.camel.Route
public String getUptime()
getUptime
in interface org.apache.camel.Route
public long getUptimeMillis()
getUptimeMillis
in interface org.apache.camel.Route
public org.apache.camel.Endpoint getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
public org.apache.camel.spi.RouteContext getRouteContext()
getRouteContext
in interface org.apache.camel.Route
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.Route
public Map<String,Object> getProperties()
getProperties
in interface org.apache.camel.Route
public String getDescription()
getDescription
in interface org.apache.camel.Route
public void onStartingServices(List<org.apache.camel.Service> services) throws Exception
onStartingServices
in interface org.apache.camel.Route
Exception
public List<org.apache.camel.Service> getServices()
getServices
in interface org.apache.camel.Route
public void addService(org.apache.camel.Service service)
addService
in interface org.apache.camel.Route
public void warmUp()
warmUp
in interface org.apache.camel.Route
public void start()
RouteController.startRoute(String)
to start a route.start
in interface org.apache.camel.Service
start
in class org.apache.camel.support.service.ServiceSupport
public void stop()
RouteController.stopRoute(String)
to stop a route.stop
in interface org.apache.camel.Service
stop
in class org.apache.camel.support.service.ServiceSupport
protected void addServices(List<org.apache.camel.Service> services) throws Exception
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.ServiceSupport
Exception
Apache Camel