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.DefaultRouteController
ClusteredRouteController
.
-
-
Constructor Summary
Constructors Constructor Description ClusteredRouteController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(ClusteredRouteFilter filter)
Add a filter used to to filter cluster aware routes.void
addRouteConfiguration(String routeId, ClusteredRouteConfiguration configuration)
Add a configuration for the given route.void
doStart()
void
doStop()
org.apache.camel.cluster.CamelClusterService
getClusterService()
org.apache.camel.cluster.CamelClusterService.Selector
getClusterServiceSelector()
Collection<org.apache.camel.Route>
getControlledRoutes()
Collection<ClusteredRouteFilter>
getFilters()
Duration
getInitialDelay()
String
getNamespace()
Map<String,ClusteredRouteConfiguration>
getRoutesConfiguration()
void
setCamelContext(org.apache.camel.CamelContext camelContext)
void
setClusterService(org.apache.camel.cluster.CamelClusterService clusterService)
Set the cluster service to use.void
setClusterServiceSelector(org.apache.camel.cluster.CamelClusterService.Selector clusterServiceSelector)
Set the selector strategy to look-up aCamelClusterService
void
setFilters(Collection<ClusteredRouteFilter> filters)
Sets the filters used to filter cluster aware routes.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.void
setNamespace(String namespace)
Set the default namespace.void
setRoutesConfiguration(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, resumeRoute, setLoggingLevel, startAllRoutes, startRoute, 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:
getControlledRoutes
in interfaceorg.apache.camel.spi.RouteController
- Overrides:
getControlledRoutes
in classorg.apache.camel.impl.engine.DefaultRouteController
-
doStart
public void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStop
public void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
- Overrides:
setCamelContext
in classorg.apache.camel.impl.engine.DefaultRouteController
-
-