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.HasCamelContext
,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.NonManagedService
A default
RouteController
that 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:
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends org.apache.camel.spi.RouteController>
Torg.apache.camel.CamelContext
Collection
<org.apache.camel.Route> protected org.apache.camel.spi.RouteController
org.apache.camel.LoggingLevel
org.apache.camel.ServiceStatus
getRouteStatus
(String routeId) boolean
boolean
boolean
boolean
void
void
void
resumeRoute
(String routeId) void
setCamelContext
(org.apache.camel.CamelContext camelContext) void
setLoggingLevel
(org.apache.camel.LoggingLevel loggingLevel) void
void
startRoute
(String routeId) void
void
void
boolean
void
org.apache.camel.spi.SupervisingRouteController
void
suspendRoute
(String routeId) void
suspendRoute
(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
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultRouteController
public DefaultRouteController() -
DefaultRouteController
public DefaultRouteController(org.apache.camel.CamelContext camelContext)
-
-
Method Details
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContext
in interfaceorg.apache.camel.spi.HasCamelContext
-
getLoggingLevel
public org.apache.camel.LoggingLevel getLoggingLevel()- Specified by:
getLoggingLevel
in interfaceorg.apache.camel.spi.RouteController
-
setLoggingLevel
public void setLoggingLevel(org.apache.camel.LoggingLevel loggingLevel) - Specified by:
setLoggingLevel
in interfaceorg.apache.camel.spi.RouteController
-
isSupervising
public boolean isSupervising()- Specified by:
isSupervising
in interfaceorg.apache.camel.spi.RouteController
-
getInternalRouteController
protected org.apache.camel.spi.RouteController getInternalRouteController() -
startAllRoutes
- Specified by:
startAllRoutes
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
stopAllRoutes
- Specified by:
stopAllRoutes
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
removeAllRoutes
- Specified by:
removeAllRoutes
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
isStartingRoutes
public boolean isStartingRoutes()- Specified by:
isStartingRoutes
in interfaceorg.apache.camel.spi.RouteController
-
hasUnhealthyRoutes
public boolean hasUnhealthyRoutes()- Specified by:
hasUnhealthyRoutes
in interfaceorg.apache.camel.spi.RouteController
-
reloadAllRoutes
- Specified by:
reloadAllRoutes
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
isReloadingRoutes
public boolean isReloadingRoutes()- Specified by:
isReloadingRoutes
in interfaceorg.apache.camel.spi.RouteController
-
getRouteStatus
- Specified by:
getRouteStatus
in interfaceorg.apache.camel.spi.RouteController
-
startRoute
- Specified by:
startRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
stopRoute
- Specified by:
stopRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
stopRoute
- Specified by:
stopRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
stopRoute
- Specified by:
stopRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
stopRoute
public boolean stopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout) throws Exception - Specified by:
stopRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
suspendRoute
- Specified by:
suspendRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
suspendRoute
- Specified by:
suspendRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
resumeRoute
- Specified by:
resumeRoute
in interfaceorg.apache.camel.spi.RouteController
- Throws:
Exception
-
adapt
- Specified by:
adapt
in interfaceorg.apache.camel.spi.RouteController
-
supervising
public org.apache.camel.spi.SupervisingRouteController supervising()- Specified by:
supervising
in interfaceorg.apache.camel.spi.RouteController
-
getControlledRoutes
- Specified by:
getControlledRoutes
in interfaceorg.apache.camel.spi.RouteController
-