Class ClassPathFileSystemWatcher
java.lang.Object
org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher
- All Implemented Interfaces:
- Aware,- DisposableBean,- InitializingBean,- ApplicationContextAware
public class ClassPathFileSystemWatcher
extends Object
implements InitializingBean, DisposableBean, ApplicationContextAware
Encapsulates a 
FileSystemWatcher to watch the local classpath directories for
 changes.- Since:
- 1.3.0
- Author:
- Phillip Webb
- See Also:
- 
- ClassPathFileChangeListener
 
- 
Constructor SummaryConstructorsConstructorDescriptionClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls) Create a newClassPathFileSystemWatcherinstance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoiddestroy()voidsetApplicationContext(ApplicationContext applicationContext) voidsetStopWatcherOnRestart(boolean stopWatcherOnRestart) Set if theFileSystemWatchershould be stopped when a full restart occurs.
- 
Constructor Details- 
ClassPathFileSystemWatcherpublic ClassPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ClassPathRestartStrategy restartStrategy, URL[] urls) Create a newClassPathFileSystemWatcherinstance.- Parameters:
- fileSystemWatcherFactory- a factory to create the underlying- FileSystemWatcherused to monitor the local file system
- restartStrategy- the classpath restart strategy
- urls- the URLs to watch
 
 
- 
- 
Method Details- 
setStopWatcherOnRestartpublic void setStopWatcherOnRestart(boolean stopWatcherOnRestart) Set if theFileSystemWatchershould be stopped when a full restart occurs.- Parameters:
- stopWatcherOnRestart- if the watcher should be stopped when a restart occurs
 
- 
setApplicationContext- Specified by:
- setApplicationContextin interface- ApplicationContextAware
- Throws:
- BeansException
 
- 
afterPropertiesSet- Specified by:
- afterPropertiesSetin interface- InitializingBean
- Throws:
- Exception
 
- 
destroy- Specified by:
- destroyin interface- DisposableBean
- Throws:
- Exception
 
 
-