Package org.apache.camel.impl.cluster
Class ClusteredRouteController
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.impl.engine.DefaultRouteController
-
- org.apache.camel.impl.cluster.ClusteredRouteController
-
- 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
public class ClusteredRouteController extends org.apache.camel.impl.engine.DefaultRouteControllerClusteredRouteController.
-
-
Constructor Summary
Constructors Constructor Description ClusteredRouteController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(ClusteredRouteFilter filter)Add a filter used to to filter cluster aware routes.voidaddRouteConfiguration(String routeId, ClusteredRouteConfiguration configuration)Add a configuration for the given route.voiddoStart()voiddoStop()org.apache.camel.cluster.CamelClusterServicegetClusterService()org.apache.camel.cluster.CamelClusterService.SelectorgetClusterServiceSelector()Collection<org.apache.camel.Route>getControlledRoutes()Collection<ClusteredRouteFilter>getFilters()DurationgetInitialDelay()StringgetNamespace()Map<String,ClusteredRouteConfiguration>getRoutesConfiguration()voidsetCamelContext(org.apache.camel.CamelContext camelContext)voidsetClusterService(org.apache.camel.cluster.CamelClusterService clusterService)Set the cluster service to use.voidsetClusterServiceSelector(org.apache.camel.cluster.CamelClusterService.Selector clusterServiceSelector)Set the selector strategy to look-up aCamelClusterServicevoidsetFilters(Collection<ClusteredRouteFilter> filters)Sets the filters used to filter cluster aware routes.voidsetInitialDelay(Duration initialDelay)Set the amount of time the route controller should wait before to start the routes after the camel context is started.voidsetNamespace(String namespace)Set the default namespace.voidsetRoutesConfiguration(Map<String,ClusteredRouteConfiguration> configurations)Sets the configurations for the routes.-
Methods inherited from class org.apache.camel.impl.engine.DefaultRouteController
adapt, getCamelContext, getInternalRouteController, getLoggingLevel, getRouteStatus, isStartingRoutes, isSupervising, removeAllRoutes, resumeRoute, setLoggingLevel, startAllRoutes, startRoute, stopAllRoutes, stopRoute, stopRoute, stopRoute, supervising, suspendRoute, suspendRoute
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, 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
-
addFilter
public void addFilter(ClusteredRouteFilter filter)
Add a filter used to to filter cluster aware routes.
-
setFilters
public void setFilters(Collection<ClusteredRouteFilter> filters)
Sets the filters used to filter cluster aware routes.
-
getFilters
public Collection<ClusteredRouteFilter> getFilters()
-
addRouteConfiguration
public void addRouteConfiguration(String routeId, ClusteredRouteConfiguration configuration)
Add a configuration for the given route.
-
setRoutesConfiguration
public void setRoutesConfiguration(Map<String,ClusteredRouteConfiguration> configurations)
Sets the configurations for the routes.
-
getRoutesConfiguration
public Map<String,ClusteredRouteConfiguration> getRoutesConfiguration()
-
getInitialDelay
public Duration getInitialDelay()
-
setInitialDelay
public void setInitialDelay(Duration initialDelay)
Set the amount of time the route controller should wait before to start the routes after the camel context is started.- Parameters:
initialDelay- the initial delay.
-
getNamespace
public String getNamespace()
-
setNamespace
public void setNamespace(String namespace)
Set the default namespace.
-
getClusterService
public org.apache.camel.cluster.CamelClusterService getClusterService()
-
setClusterService
public void setClusterService(org.apache.camel.cluster.CamelClusterService clusterService)
Set the cluster service to use.
-
getClusterServiceSelector
public org.apache.camel.cluster.CamelClusterService.Selector getClusterServiceSelector()
-
setClusterServiceSelector
public void setClusterServiceSelector(org.apache.camel.cluster.CamelClusterService.Selector clusterServiceSelector)
Set the selector strategy to look-up aCamelClusterService
-
getControlledRoutes
public Collection<org.apache.camel.Route> getControlledRoutes()
- Specified by:
getControlledRoutesin interfaceorg.apache.camel.spi.RouteController- Overrides:
getControlledRoutesin classorg.apache.camel.impl.engine.DefaultRouteController
-
doStart
public void doStart() throws Exception- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
public void doStop() throws Exception- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware- Overrides:
setCamelContextin classorg.apache.camel.impl.engine.DefaultRouteController
-
-