public class ClassPathFileSystemWatcher
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
FileSystemWatcher to watch the local classpath directories for
changes.ClassPathFileChangeListener| Constructor and Description |
|---|
ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory,
ClassPathRestartStrategy restartStrategy,
java.net.URL[] urls)
Create a new
ClassPathFileSystemWatcher instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setStopWatcherOnRestart(boolean stopWatcherOnRestart)
Set if the
FileSystemWatcher should be stopped when a full restart occurs. |
public ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, java.net.URL[] urls)
ClassPathFileSystemWatcher instance.fileSystemWatcherFactory - a factory to create the underlying
FileSystemWatcher used to monitor the local file systemrestartStrategy - the classpath restart strategyurls - the URLs to watchpublic void setStopWatcherOnRestart(boolean stopWatcherOnRestart)
FileSystemWatcher should be stopped when a full restart occurs.stopWatcherOnRestart - if the watcher should be stopped when a restart occurspublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exception