Package org.apache.camel.impl.engine
Class DefaultRouteController
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.impl.engine.DefaultRouteController
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.NonManagedService,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.RouteController,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService
- Direct Known Subclasses:
DefaultSupervisingRouteController
public class DefaultRouteController extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.RouteController, org.apache.camel.NonManagedServiceA defaultRouteControllerthat starts the routes in a fail-fast mode, which means if any of the routes fail to startup then this causes Camel to fail to startup as well.- See Also:
DefaultSupervisingRouteController
-
-
Constructor Summary
Constructors Constructor Description DefaultRouteController()DefaultRouteController(org.apache.camel.CamelContext camelContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.apache.camel.spi.RouteController>
Tadapt(Class<T> type)org.apache.camel.CamelContextgetCamelContext()Collection<org.apache.camel.Route>getControlledRoutes()protected org.apache.camel.spi.RouteControllergetInternalRouteController()org.apache.camel.LoggingLevelgetRouteStartupLoggingLevel()org.apache.camel.ServiceStatusgetRouteStatus(String routeId)booleanisStartingRoutes()voidresumeRoute(String routeId)voidsetCamelContext(org.apache.camel.CamelContext camelContext)voidsetRouteStartupLoggingLevel(org.apache.camel.LoggingLevel routeStartupLoggingLevel)voidstartAllRoutes()voidstartRoute(String routeId)voidstopRoute(String routeId)voidstopRoute(String routeId, long timeout, TimeUnit timeUnit)booleanstopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout)org.apache.camel.spi.SupervisingRouteControllersupervising()voidsuspendRoute(String routeId)voidsuspendRoute(String routeId, long timeout, TimeUnit timeUnit)-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getRouteStartupLoggingLevel
public org.apache.camel.LoggingLevel getRouteStartupLoggingLevel()
- Specified by:
getRouteStartupLoggingLevelin interfaceorg.apache.camel.spi.RouteController
-
setRouteStartupLoggingLevel
public void setRouteStartupLoggingLevel(org.apache.camel.LoggingLevel routeStartupLoggingLevel)
- Specified by:
setRouteStartupLoggingLevelin interfaceorg.apache.camel.spi.RouteController
-
getInternalRouteController
protected org.apache.camel.spi.RouteController getInternalRouteController()
-
startAllRoutes
public void startAllRoutes() throws Exception- Specified by:
startAllRoutesin interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
isStartingRoutes
public boolean isStartingRoutes()
- Specified by:
isStartingRoutesin interfaceorg.apache.camel.spi.RouteController
-
getRouteStatus
public org.apache.camel.ServiceStatus getRouteStatus(String routeId)
- Specified by:
getRouteStatusin interfaceorg.apache.camel.spi.RouteController
-
startRoute
public void startRoute(String routeId) throws Exception
- Specified by:
startRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
stopRoute
public void stopRoute(String routeId) throws Exception
- Specified by:
stopRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
stopRoute
public void stopRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception
- Specified by:
stopRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
stopRoute
public boolean stopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout) throws Exception
- Specified by:
stopRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
suspendRoute
public void suspendRoute(String routeId) throws Exception
- Specified by:
suspendRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
suspendRoute
public void suspendRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception
- Specified by:
suspendRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
resumeRoute
public void resumeRoute(String routeId) throws Exception
- Specified by:
resumeRoutein interfaceorg.apache.camel.spi.RouteController- Throws:
Exception
-
adapt
public <T extends org.apache.camel.spi.RouteController> T adapt(Class<T> type)
- Specified by:
adaptin interfaceorg.apache.camel.spi.RouteController
-
supervising
public org.apache.camel.spi.SupervisingRouteController supervising()
- Specified by:
supervisingin interfaceorg.apache.camel.spi.RouteController
-
getControlledRoutes
public Collection<org.apache.camel.Route> getControlledRoutes()
- Specified by:
getControlledRoutesin interfaceorg.apache.camel.spi.RouteController
-
-