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:
  • 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 interface org.apache.camel.CamelContextAware
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • getLoggingLevel

      public org.apache.camel.LoggingLevel getLoggingLevel()
      Specified by:
      getLoggingLevel in interface org.apache.camel.spi.RouteController
    • setLoggingLevel

      public void setLoggingLevel(org.apache.camel.LoggingLevel loggingLevel)
      Specified by:
      setLoggingLevel in interface org.apache.camel.spi.RouteController
    • isSupervising

      public boolean isSupervising()
      Specified by:
      isSupervising in interface org.apache.camel.spi.RouteController
    • getInternalRouteController

      protected org.apache.camel.spi.RouteController getInternalRouteController()
    • startAllRoutes

      public void startAllRoutes() throws Exception
      Specified by:
      startAllRoutes in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • stopAllRoutes

      public void stopAllRoutes() throws Exception
      Specified by:
      stopAllRoutes in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • removeAllRoutes

      public void removeAllRoutes() throws Exception
      Specified by:
      removeAllRoutes in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • isStartingRoutes

      public boolean isStartingRoutes()
      Specified by:
      isStartingRoutes in interface org.apache.camel.spi.RouteController
    • hasUnhealthyRoutes

      public boolean hasUnhealthyRoutes()
      Specified by:
      hasUnhealthyRoutes in interface org.apache.camel.spi.RouteController
    • reloadAllRoutes

      public void reloadAllRoutes() throws Exception
      Specified by:
      reloadAllRoutes in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • isReloadingRoutes

      public boolean isReloadingRoutes()
      Specified by:
      isReloadingRoutes in interface org.apache.camel.spi.RouteController
    • getRouteStatus

      public org.apache.camel.ServiceStatus getRouteStatus(String routeId)
      Specified by:
      getRouteStatus in interface org.apache.camel.spi.RouteController
    • startRoute

      public void startRoute(String routeId) throws Exception
      Specified by:
      startRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • stopRoute

      public void stopRoute(String routeId) throws Exception
      Specified by:
      stopRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • stopRoute

      public void stopRoute(String routeId, Throwable cause) throws Exception
      Specified by:
      stopRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • stopRoute

      public void stopRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception
      Specified by:
      stopRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • stopRoute

      public boolean stopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout) throws Exception
      Specified by:
      stopRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • suspendRoute

      public void suspendRoute(String routeId) throws Exception
      Specified by:
      suspendRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • suspendRoute

      public void suspendRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception
      Specified by:
      suspendRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • resumeRoute

      public void resumeRoute(String routeId) throws Exception
      Specified by:
      resumeRoute in interface org.apache.camel.spi.RouteController
      Throws:
      Exception
    • adapt

      public <T extends org.apache.camel.spi.RouteController> T adapt(Class<T> type)
      Specified by:
      adapt in interface org.apache.camel.spi.RouteController
    • supervising

      public org.apache.camel.spi.SupervisingRouteController supervising()
      Specified by:
      supervising in interface org.apache.camel.spi.RouteController
    • getControlledRoutes

      public Collection<org.apache.camel.Route> getControlledRoutes()
      Specified by:
      getControlledRoutes in interface org.apache.camel.spi.RouteController