public interface HotSwapFilesModificationsListener
| Modifier and Type | Method and Description |
|---|---|
void |
fileModified(File modifiedFile)
Called when the watched file(s) are modified.
|
Set<FileToWatch> |
getFilesToWatch()
The file(s) to watch.
|
boolean |
isEnabled()
Should this listener be enabled?
|
boolean isEnabled()
You often want to use such file modifications listeners only during development, for autoreload purposes. In production, you would disable it.
When this method return false, the
listener is not registered, at all.
A common pattern for this method is to use:
return getSpincastConfig().isDevelopmentMode();
Set<FileToWatch> getFilesToWatch()
void fileModified(File modifiedFile)
Receives the file that was modified.
The method is called in a new Thread.
Copyright © 2019. All rights reserved.