Class HotSwapFilesModificationsWatcherDefault
java.lang.Object
org.spincast.plugins.hotswap.fileswatcher.HotSwapFilesModificationsWatcherDefault
- All Implemented Interfaces:
- ServerStartedListener,- HotSwapFilesModificationsWatcher
public class HotSwapFilesModificationsWatcherDefault
extends Object
implements HotSwapFilesModificationsWatcher
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionHotSwapFilesModificationsWatcherDefault(Set<HotSwapFilesModificationsListener> boundListeners) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected WatchServiceprotected WatchServiceprotected Map<String,Set<HotSwapFilesModificationsListener>> protected Map<WatchKey,Set<HotSwapFilesModificationsListener>> voidinit()protected booleanmodifiedFileMatchs(File modifiedFile, HotSwapFilesModificationsListener listener) voidAdd a new listener for modifications to file(s) to watch.voidRemoves all listeners.voidRemoves a file modifications listener.voidStarts watching registered files when the server is started.protected voidvoidStops the files watching completly.
- 
Field Details- 
loggerprotected static final org.slf4j.Logger logger
 
- 
- 
Constructor Details- 
HotSwapFilesModificationsWatcherDefault@Inject public HotSwapFilesModificationsWatcherDefault(@Nullable Set<HotSwapFilesModificationsListener> boundListeners) 
 
- 
- 
Method Details- 
init@Inject public void init()
- 
serverStartedSuccessfullypublic void serverStartedSuccessfully()Starts watching registered files when the server is started.- Specified by:
- serverStartedSuccessfullyin interface- ServerStartedListener
 
- 
getListenersByDirAbsolutePaths
- 
getWatchKeysByDirAbsolutePaths
- 
getDirAbsolutePathsByWatchKey
- 
getFileModificationsWatcherService
- 
getListenersByWatchKey
- 
createFileModificationsWatcherService
- 
registerListenerDescription copied from interface:HotSwapFilesModificationsWatcherAdd a new listener for modifications to file(s) to watch.More than one listeners can be added for the same files! - Specified by:
- registerListenerin interface- HotSwapFilesModificationsWatcher
 
- 
removeAllListenerspublic void removeAllListeners()Description copied from interface:HotSwapFilesModificationsWatcherRemoves all listeners.- Specified by:
- removeAllListenersin interface- HotSwapFilesModificationsWatcher
 
- 
removeListenerDescription copied from interface:HotSwapFilesModificationsWatcherRemoves a file modifications listener.- Specified by:
- removeListenerin interface- HotSwapFilesModificationsWatcher
 
- 
startFilesModificationsWatcherprotected void startFilesModificationsWatcher()
- 
modifiedFileMatchs
- 
stopWatchingpublic void stopWatching()Description copied from interface:HotSwapFilesModificationsWatcherStops the files watching completly. Can't be restarted.- Specified by:
- stopWatchingin interface- HotSwapFilesModificationsWatcher
 
 
-