Package org.apache.camel.support
Class RouteOnDemandReloadStrategy
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.ResourceReloadStrategySupport
org.apache.camel.support.FileWatcherResourceReloadStrategy
org.apache.camel.support.RouteWatcherReloadStrategy
org.apache.camel.support.RouteOnDemandReloadStrategy
- 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).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.support.FileWatcherResourceReloadStrategy
FileWatcherResourceReloadStrategy.WatchFileChangesTask -
Field Summary
Fields inherited from class org.apache.camel.support.RouteWatcherReloadStrategy
RELOAD_RESOURCESFields 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
ConstructorsConstructorDescriptionRouteOnDemandReloadStrategy(String directory) RouteOnDemandReloadStrategy(String directory, boolean recursive) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoOnReload(Object source) voidonReload()Triggers on-demand reloadingvoidTriggers on-demand reloadingMethods inherited from class org.apache.camel.support.RouteWatcherReloadStrategy
doStart, getPattern, isRemoveAllRoutes, onGroovyReload, onPropertiesReload, onRouteReload, setPattern, setRemoveAllRoutes, startupMessageMethods inherited from class org.apache.camel.support.FileWatcherResourceReloadStrategy
doStop, getFileFilter, getFolder, isRecursive, isRunning, setFileFilter, setFolder, setPollTimeout, setRecursive, setSchedulerMethods inherited from class org.apache.camel.support.ResourceReloadStrategySupport
getCamelContext, getFailedCounter, getLastError, getReloadCounter, getResourceReload, incFailedCounter, incSucceededCounter, lastErrorMessage, resetCounters, setCamelContext, setFailed, setLastError, setResourceReload, setSucceededMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
RouteOnDemandReloadStrategy
public RouteOnDemandReloadStrategy() -
RouteOnDemandReloadStrategy
-
RouteOnDemandReloadStrategy
-
-
Method Details
-
onReload
@ManagedOperation(description="Trigger on-demand reloading") public void onReload()Triggers on-demand reloading -
onReload
Triggers on-demand reloading- Specified by:
onReloadin interfaceorg.apache.camel.spi.ReloadStrategy- Overrides:
onReloadin classFileWatcherResourceReloadStrategy
-
doOnReload
- Throws:
Exception
-