Package com.qfs.msg
Interface IWatcherService
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
WatcherService
Watcher service to subscribe to the events of a path.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisWatcherPaused(IWatcher watcher) Says if the processing of events for a given watcher is paused.voidpauseWatcher(IWatcher watcher) Pauses the processing of events for a given watcher.Register a watcher of a path.voidregisterAll(IWatcher watcher, Path path) Register recursively all the directories.voidresumeWatcher(IWatcher watcher) Resumes the processing of events for a given watcher.voidunregister(IWatcher watcher) Unregisters the given watcher.
-
Method Details
-
register
Register a watcher of a path. When events related to this path are detected by the service, the watcher will be called back.- Parameters:
watcher- The watcher to register.path- The path to watch.- Returns:
- the watchKey
-
unregister
Unregisters the given watcher.- Parameters:
watcher- The watcher to unregister from this watcher service.
-
registerAll
Register recursively all the directories.- Parameters:
watcher- the watcherpath- the directory that may contain other subdirectories
-
pauseWatcher
Pauses the processing of events for a given watcher.- Parameters:
watcher- The watcher for which to stop processing events.
-
resumeWatcher
Resumes the processing of events for a given watcher.- Parameters:
watcher- The watcher for which to resume processing events.
-
isWatcherPaused
Says if the processing of events for a given watcher is paused.- Parameters:
watcher- The watcher of which to check the status.- Returns:
trueif the processing of events of the given watcher is paused,falseotherwise.
-