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_RESOURCES
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
ConstructorsConstructorDescriptionRouteOnDemandReloadStrategy
(String directory) RouteOnDemandReloadStrategy
(String directory, boolean recursive) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doOnReload
(Object source) void
onReload()
Triggers on-demand reloadingvoid
Triggers on-demand reloadingMethods 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
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
-
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:
onReload
in interfaceorg.apache.camel.spi.ReloadStrategy
- Overrides:
onReload
in classFileWatcherResourceReloadStrategy
-
doOnReload
- Throws:
Exception
-