public abstract class Watcher extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
class |
Watcher.FilteringFileVisitor |
Constructor and Description |
---|
Watcher() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
debug(String message,
Object... args) |
void |
fail(String message)
Throws an invalid argument exception after logging a warning
just in case the stack trace gets gobbled up by application containers
like spring or blueprint, at least the error message will be clearly shown in the log
|
java.nio.file.PathMatcher |
getDirMatcher() |
java.nio.file.PathMatcher |
getFileMatcher() |
protected java.nio.file.FileSystem |
getFileSystem() |
long |
getLastModified() |
java.nio.file.Path |
getRoot() |
java.nio.file.WatchService |
getWatcher() |
void |
init() |
protected boolean |
isMatchesFile(java.nio.file.Path file) |
boolean |
isWatch() |
protected abstract void |
onRemove(java.nio.file.Path path) |
protected abstract void |
process(java.nio.file.Path path) |
void |
processEvents() |
void |
rescan() |
void |
setDirMatcher(java.nio.file.PathMatcher dirMatcher) |
void |
setFileMatcher(java.nio.file.PathMatcher fileMatcher) |
void |
setRoot(java.nio.file.Path root) |
void |
setRootDirectory(File directory) |
void |
setRootPath(String rootPath) |
void |
setWatch(boolean watch) |
void |
setWatcher(java.nio.file.WatchService watcher) |
protected abstract void |
warn(String message,
Object... args) |
public void init() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public long getLastModified()
public void setRootPath(String rootPath)
public void setRootDirectory(File directory)
public java.nio.file.Path getRoot()
public void setRoot(java.nio.file.Path root)
public boolean isWatch()
public void setWatch(boolean watch)
public java.nio.file.WatchService getWatcher()
public void setWatcher(java.nio.file.WatchService watcher)
public java.nio.file.PathMatcher getDirMatcher()
public void setDirMatcher(java.nio.file.PathMatcher dirMatcher)
public java.nio.file.PathMatcher getFileMatcher()
public void setFileMatcher(java.nio.file.PathMatcher fileMatcher)
public void rescan() throws IOException
IOException
public void processEvents()
protected boolean isMatchesFile(java.nio.file.Path file)
protected java.nio.file.FileSystem getFileSystem()
public void fail(String message)
protected abstract void process(java.nio.file.Path path)
protected abstract void onRemove(java.nio.file.Path path)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.