Class WatchServiceFileSystemWatcher
- java.lang.Object
-
- io.quarkus.deployment.dev.filesystem.watch.WatchServiceFileSystemWatcher
-
- All Implemented Interfaces:
Runnable
public class WatchServiceFileSystemWatcher extends Object implements Runnable
File system watcher service based on JDK7WatchService
. Instantiating this class will create a new thread, that will run untilclose()
is called. NOTE: this was copied from Xnio, it provides more functionality than we currently need.
-
-
Constructor Summary
Constructors Constructor Description WatchServiceFileSystemWatcher(String name, boolean daemon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
run()
void
unwatchPath(File file, FileChangeCallback callback)
void
watchPath(File file, FileChangeCallback callback)
-
-
-
Constructor Detail
-
WatchServiceFileSystemWatcher
public WatchServiceFileSystemWatcher(String name, boolean daemon)
-
-
Method Detail
-
watchPath
public void watchPath(File file, FileChangeCallback callback)
-
unwatchPath
public void unwatchPath(File file, FileChangeCallback callback)
-
close
public void close() throws IOException
- Throws:
IOException
-
-