public class RouteService extends ChildServiceSupport
RouteDefinition
so that it can be stopped independently
of other routesshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
RouteService(DefaultCamelContext camelContext,
RouteDefinition routeDefinition,
List<RouteContext> routeContexts,
List<Route> routes) |
Modifier and Type | Method and Description |
---|---|
protected void |
doResume()
Implementations override this method to support customized suspend/resume.
|
protected void |
doShutdown()
Implementations override this method to perform customized shutdown.
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
protected void |
doSuspend()
Implementations override this method to support customized suspend/resume.
|
Set<Endpoint> |
gatherEndpoints()
Gather all the endpoints this route service uses
This implementation finds the endpoints by searching all the child services
for
EndpointAware processors which uses an endpoint. |
CamelContext |
getCamelContext() |
String |
getId() |
Map<Route,Consumer> |
getInputs()
Gets the inputs to the routes.
|
List<RouteContext> |
getRouteContexts() |
RouteDefinition |
getRouteDefinition() |
Collection<Route> |
getRoutes() |
boolean |
isRemovingRoutes() |
void |
setRemovingRoutes(boolean removingRoutes) |
protected void |
startChildService(Route route,
List<Service> services) |
protected void |
stopChildService(Route route,
Set<Service> services,
boolean shutdown) |
void |
warmUp() |
addChildService, removeChildService, shutdown, start, start, stop
getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, suspend
public RouteService(DefaultCamelContext camelContext, RouteDefinition routeDefinition, List<RouteContext> routeContexts, List<Route> routes)
public CamelContext getCamelContext()
public List<RouteContext> getRouteContexts()
public RouteDefinition getRouteDefinition()
public Collection<Route> getRoutes()
public Set<Endpoint> gatherEndpoints()
EndpointAware
processors which uses an endpoint.public Map<Route,Consumer> getInputs()
Consumer
as inputs for the routespublic boolean isRemovingRoutes()
public void setRemovingRoutes(boolean removingRoutes)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
protected void doShutdown() throws Exception
ServiceSupport
doShutdown
in class ServiceSupport
Exception
protected void doSuspend() throws Exception
ServiceSupport
doSuspend
in class ServiceSupport
Exception
protected void doResume() throws Exception
ServiceSupport
doResume
in class ServiceSupport
Exception
protected void startChildService(Route route, List<Service> services) throws Exception
Exception
Apache Camel