public class ClassPathFileSystemWatcher extends Object implements InitializingBean, DisposableBean, ApplicationContextAware
FileSystemWatcher
to watch the local classpath folders for
changes.ClassPathFileChangeListener
Constructor and Description |
---|
ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory,
ClassPathRestartStrategy restartStrategy,
URL[] urls)
Create a new
ClassPathFileSystemWatcher instance. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setStopWatcherOnRestart(boolean stopWatcherOnRestart)
Set if the
FileSystemWatcher should be stopped when a full restart occurs. |
public ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, 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(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.