public class FileMonitorDaemon
extends java.lang.Thread
ExtractionController| Modifier and Type | Field and Description |
|---|---|
protected ExtractionController |
controller |
protected java.nio.file.WatchService |
fileWatcher |
protected java.util.HashSet<java.nio.file.Path> |
monitoredFiles
This HashSet contains the monitored files, so the events can be filtered
and just be handled if thrown by one of these files.
|
| Constructor and Description |
|---|
FileMonitorDaemon(ExtractionController controller) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createWatcher() |
protected void |
observe() |
void |
registerFile(java.nio.file.Path path)
Only the parent directories can be registered.
|
void |
run() |
void |
update() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected java.nio.file.WatchService fileWatcher
protected final java.util.HashSet<java.nio.file.Path> monitoredFiles
protected final ExtractionController controller
public FileMonitorDaemon(ExtractionController controller)
controller - public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected void createWatcher()
protected void observe()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void update()
public void registerFile(java.nio.file.Path path)
path -