org.apache.camel.impl
Class RouteService
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.RouteService
- All Implemented Interfaces:
- Service, ShutdownableService
public class RouteService
- extends ServiceSupport
Represents the runtime objects for a given RouteDefinition
so that it can be stopped independently
of other routes
- Version:
- $Revision: 944519 $
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RouteService
public RouteService(DefaultCamelContext camelContext,
RouteDefinition routeDefinition,
List<RouteContext> routeContexts,
List<Route> routes)
getId
public String getId()
getCamelContext
public CamelContext getCamelContext()
getRouteContexts
public List<RouteContext> getRouteContexts()
getRouteDefinition
public RouteDefinition getRouteDefinition()
getRoutes
public Collection<Route> getRoutes()
startInputs
public void startInputs(boolean flag)
- Sets whether inputs (consumers) should be started when starting the routes
By default inputs are started.
- Parameters:
flag
- flag to either start inputs or not
getInputs
public Map<Route,Consumer> getInputs()
- Gets the inputs to the routes.
- Returns:
- list of
Consumer
as inputs for the routes
isRemovingRoutes
public boolean isRemovingRoutes()
setRemovingRoutes
public void setRemovingRoutes(boolean removingRoutes)
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class ServiceSupport
- Throws:
Exception
startChildService
protected void startChildService(Route route,
Service... services)
throws Exception
- Throws:
Exception
startChildService
protected void startChildService(Route route,
List<Service> services)
throws Exception
- Throws:
Exception
stopChildService
protected void stopChildService(Route route,
List<Service> services,
boolean shutdown)
throws Exception
- Throws:
Exception
Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.