Class FileWatcher
- java.lang.Object
-
- com.g2forge.alexandria.java.concurrent.AThreadActor
-
- com.g2forge.alexandria.java.io.watch.FileWatcher
-
- All Implemented Interfaces:
ICloseable
,Closeable
,AutoCloseable
public class FileWatcher extends AThreadActor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FileWatcher.FileSystemContext
static interface
FileWatcher.IWatchHandler
protected static class
FileWatcher.WatchValue
-
Nested classes/interfaces inherited from class com.g2forge.alexandria.java.concurrent.AThreadActor
AThreadActor.State
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<FileSystem,FileWatcher.FileSystemContext>
fileSystems
-
Fields inherited from class com.g2forge.alexandria.java.concurrent.AThreadActor
state, thread
-
-
Constructor Summary
Constructors Constructor Description FileWatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileWatcher
open()
protected void
run()
ICloseable
watch(Path path, FileWatcher.IWatchHandler handler, WatchEvent.Kind<?>... kinds)
-
Methods inherited from class com.g2forge.alexandria.java.concurrent.AThreadActor
close, getState, isOpen, shutdown, waitClosed
-
-
-
-
Field Detail
-
fileSystems
protected final Map<FileSystem,FileWatcher.FileSystemContext> fileSystems
-
-
Method Detail
-
open
public FileWatcher open()
- Overrides:
open
in classAThreadActor
-
run
protected void run()
- Specified by:
run
in classAThreadActor
-
watch
public ICloseable watch(Path path, FileWatcher.IWatchHandler handler, WatchEvent.Kind<?>... kinds)
-
-