public abstract class Watcher
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
Watcher(java.nio.file.Path filePath,
WatchEventListener watchEventListener) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCreatedFilePathName(java.lang.String filePathName) |
protected void |
clearCreatedFilePathNames() |
void |
close() |
protected void |
fireWatchEventListener(java.lang.String eventType,
java.nio.file.Path filePath) |
protected java.nio.file.Path |
getBaseFilePath() |
java.util.List<java.lang.String> |
getDownloadedFilePathNames() |
protected java.util.List<java.nio.file.Path> |
getFailedFilePaths() |
protected abstract void |
init() |
protected boolean |
isIgnoredFilePath(java.nio.file.Path filePath) |
protected void |
processFailedFilePaths() |
protected void |
processMissingFilePath(java.nio.file.Path missingFilePath) |
protected void |
processWatchEvent(java.lang.String eventType,
java.nio.file.Path filePath) |
abstract void |
registerFilePath(java.nio.file.Path filePath) |
protected boolean |
removeCreatedFilePathName(java.lang.String filePathName) |
abstract void |
unregisterFilePath(java.nio.file.Path filePath) |
void |
walkFileTree(java.nio.file.Path filePath) |
public Watcher(java.nio.file.Path filePath, WatchEventListener watchEventListener) throws java.io.IOException
java.io.IOException
public void close()
public java.util.List<java.lang.String> getDownloadedFilePathNames()
public abstract void registerFilePath(java.nio.file.Path filePath) throws java.io.IOException
java.io.IOException
public abstract void unregisterFilePath(java.nio.file.Path filePath)
public void walkFileTree(java.nio.file.Path filePath) throws java.io.IOException
java.io.IOException
protected void addCreatedFilePathName(java.lang.String filePathName)
protected void clearCreatedFilePathNames()
protected void fireWatchEventListener(java.lang.String eventType, java.nio.file.Path filePath)
protected java.nio.file.Path getBaseFilePath()
protected java.util.List<java.nio.file.Path> getFailedFilePaths()
protected abstract void init()
protected boolean isIgnoredFilePath(java.nio.file.Path filePath)
protected void processFailedFilePaths() throws java.io.IOException
java.io.IOException
protected void processMissingFilePath(java.nio.file.Path missingFilePath)
protected void processWatchEvent(java.lang.String eventType, java.nio.file.Path filePath) throws java.io.IOException
java.io.IOException
protected boolean removeCreatedFilePathName(java.lang.String filePathName)