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.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_RESOURCES
-
-
Constructor Summary
Constructors Constructor Description RouteOnDemandReloadStrategy()
RouteOnDemandReloadStrategy(String directory)
RouteOnDemandReloadStrategy(String directory, boolean recursive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doOnReload(Object source)
void
onReload()
Triggers on-demand reloadingvoid
onReload(Object source)
Triggers on-demand reloading-
Methods inherited from class org.apache.camel.support.RouteWatcherReloadStrategy
doStart, getPattern, isRemoveAllRoutes, onPropertiesReload, onRouteReload, setPattern, setRemoveAllRoutes, startupMessage
-
Methods inherited from class org.apache.camel.support.FileWatcherResourceReloadStrategy
doStop, getFileFilter, getFolder, isRecursive, isRunning, setFileFilter, setFolder, setPollTimeout, setRecursive, setScheduler
-
Methods inherited from class org.apache.camel.support.ResourceReloadStrategySupport
getCamelContext, getFailedCounter, getReloadCounter, getResourceReload, incFailedCounter, incSucceededCounter, resetCounters, setCamelContext, setFailed, setResourceReload, setSucceeded
-
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
-
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 interfaceorg.apache.camel.spi.ReloadStrategy
- Overrides:
onReload
in classFileWatcherResourceReloadStrategy
-
-