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.HasCamelContext, 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
Clustered RouteController.
  • 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a filter used to to filter cluster aware routes.
    void
    Add a configuration for the given route.
    void
     
    void
     
    org.apache.camel.cluster.CamelClusterService
     
    org.apache.camel.cluster.CamelClusterService.Selector
     
    Collection<org.apache.camel.Route>
     
     
     
     
     
    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 a CamelClusterService
    void
    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
    Sets the configurations for the routes.

    Methods inherited from class org.apache.camel.impl.engine.DefaultRouteController

    adapt, getCamelContext, getInternalRouteController, getLoggingLevel, getRouteStatus, isReloadingRoutes, isStartingRoutes, isSupervising, reloadAllRoutes, removeAllRoutes, resumeRoute, setLoggingLevel, startAllRoutes, startRoute, stopAllRoutes, stopRoute, 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

    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

    • ClusteredRouteController

      public ClusteredRouteController()
  • Method Details

    • 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 a CamelClusterService
    • getControlledRoutes

      public Collection<org.apache.camel.Route> getControlledRoutes()
      Specified by:
      getControlledRoutes in interface org.apache.camel.spi.RouteController
      Overrides:
      getControlledRoutes in class org.apache.camel.impl.engine.DefaultRouteController
    • doStart

      public void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      public void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Specified by:
      setCamelContext in interface org.apache.camel.CamelContextAware
      Overrides:
      setCamelContext in class org.apache.camel.impl.engine.DefaultRouteController