public class ClassPathFileSystemWatcher extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.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(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, 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.ApplicationContextAware
org.springframework.beans.BeansException
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.