public class FileWatcher extends WatcherSupport
Modifier and Type | Class and Description |
---|---|
class |
FileWatcher.FilteringFileVisitor |
Constructor and Description |
---|
FileWatcher() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
static void |
fail(org.slf4j.Logger logger,
java.lang.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.util.concurrent.ExecutorService |
getExecutor() |
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() |
void |
setDirMatcher(java.nio.file.PathMatcher dirMatcher) |
void |
setDirMatchPattern(java.lang.String pattern)
Sets the directory matching pattern using the
java 7 pattern matching syntax
such as
glob:/foo/* |
void |
setExecutor(java.util.concurrent.ExecutorService executor) |
void |
setFileMatcher(java.nio.file.PathMatcher fileMatcher) |
void |
setFileMatchPattern(java.lang.String pattern)
Sets the file matching pattern using the
java 7 pattern matching syntax
such as
glob:*.xml |
void |
setRoot(java.nio.file.Path root) |
void |
setRootDirectory(java.io.File directory) |
void |
setRootPath(java.lang.String rootPath) |
void |
setWatch(boolean watch) |
void |
setWatcher(java.nio.file.WatchService watcher) |
addListener, fireListeners, getListeners, getProcessor, removeListener, setProcessor
public void init() throws java.io.IOException
java.io.IOException
public void destroy()
public long getLastModified()
public void setRootPath(java.lang.String rootPath)
public void setRootDirectory(java.io.File directory)
public void setDirMatchPattern(java.lang.String pattern)
glob:/foo/*
public void setFileMatchPattern(java.lang.String pattern)
glob:*.xml
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 java.util.concurrent.ExecutorService getExecutor()
public void setExecutor(java.util.concurrent.ExecutorService executor)
protected boolean isMatchesFile(java.nio.file.Path file)
protected java.nio.file.FileSystem getFileSystem()
public static void fail(org.slf4j.Logger logger, java.lang.String message)
Copyright © 2017 Red Hat. All Rights Reserved.