Package org.apache.camel.impl.engine
Class RouteService
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.ChildServiceSupport
-
- org.apache.camel.impl.engine.RouteService
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class RouteService extends org.apache.camel.support.ChildServiceSupportRepresents the runtime objects for a given route so that it can be stopped independently of other routes
-
-
Constructor Summary
Constructors Constructor Description RouteService(org.apache.camel.Route route)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGetRouteServices(List<org.apache.camel.Service> services)Gather all other kind of route services from the given route, except error handlerprotected voiddoResume()protected voiddoShutdown()protected voiddoStart()protected voiddoStop()protected voiddoSuspend()protected voiddoWarmUp()Set<org.apache.camel.Endpoint>gatherEndpoints()Gather all the endpoints this route service usesorg.apache.camel.CamelContextgetCamelContext()StringgetId()Map<org.apache.camel.Route,org.apache.camel.Consumer>getInputs()Gets the inputs to the routes.org.apache.camel.RoutegetRoute()booleanisAutoStartup()booleanisRemovingRoutes()voidsetRemovingRoutes(boolean removingRoutes)protected voidstartChildService(org.apache.camel.Route route, List<org.apache.camel.Service> services)protected voidstopChildService(org.apache.camel.Route route, Set<org.apache.camel.Service> services, boolean shutdown)voidwarmUp()-
Methods inherited from class org.apache.camel.support.ChildServiceSupport
addChildService, removeChildService, shutdown, start, stop
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getId
public String getId()
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
-
getRoute
public org.apache.camel.Route getRoute()
-
gatherEndpoints
public Set<org.apache.camel.Endpoint> gatherEndpoints()
Gather all the endpoints this route service uses This implementation finds the endpoints by searching all the child services forEndpointAwareprocessors which uses an endpoint.
-
getInputs
public Map<org.apache.camel.Route,org.apache.camel.Consumer> getInputs()
Gets the inputs to the routes.- Returns:
- list of
Consumeras inputs for the routes
-
isRemovingRoutes
public boolean isRemovingRoutes()
-
setRemovingRoutes
public void setRemovingRoutes(boolean removingRoutes)
-
warmUp
public void warmUp() throws org.apache.camel.FailedToStartRouteException- Throws:
org.apache.camel.FailedToStartRouteException
-
isAutoStartup
public boolean isAutoStartup()
-
doStart
protected void doStart()
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService
-
doStop
protected void doStop()
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService
-
doShutdown
protected void doShutdown()
- Overrides:
doShutdownin classorg.apache.camel.support.service.BaseService
-
doSuspend
protected void doSuspend()
- Overrides:
doSuspendin classorg.apache.camel.support.service.BaseService
-
doResume
protected void doResume()
- Overrides:
doResumein classorg.apache.camel.support.service.BaseService
-
startChildService
protected void startChildService(org.apache.camel.Route route, List<org.apache.camel.Service> services)
-
stopChildService
protected void stopChildService(org.apache.camel.Route route, Set<org.apache.camel.Service> services, boolean shutdown)
-
doGetRouteServices
protected void doGetRouteServices(List<org.apache.camel.Service> services)
Gather all other kind of route services from the given route, except error handler
-
-