Class RouteOnDemandReloadStrategy

java.lang.Object
org.apache.camel.support.service.BaseService
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.ReloadStrategy, org.apache.camel.spi.ResourceReloadStrategy, org.apache.camel.StatefulService, org.apache.camel.StaticService, org.apache.camel.SuspendableService

@ManagedResource(description="Managed RouteOnDemandReloadStrategy") public class RouteOnDemandReloadStrategy extends RouteWatcherReloadStrategy
Strategy for triggering on-demand reloading of Camel routes in a running Camel application. The strategy is triggered on-demand and reload all files from a directory (and subdirectories).
  • Constructor Details

    • RouteOnDemandReloadStrategy

      public RouteOnDemandReloadStrategy()
    • RouteOnDemandReloadStrategy

      public RouteOnDemandReloadStrategy(String directory)
    • RouteOnDemandReloadStrategy

      public RouteOnDemandReloadStrategy(String directory, boolean recursive)
  • Method Details

    • onReload

      @ManagedOperation(description="Trigger on-demand reloading") public void onReload()
      Triggers on-demand reloading
    • onReload

      public void onReload(Object source)
      Triggers on-demand reloading
      Specified by:
      onReload in interface org.apache.camel.spi.ReloadStrategy
      Overrides:
      onReload in class FileWatcherResourceReloadStrategy
    • doOnReload

      protected void doOnReload(Object source) throws Exception
      Throws:
      Exception