public class ObserverCoordinator extends java.lang.Thread implements FilePollerListenerInterface, java.io.FileFilter
The subdirectories are watched by JobCoordinators. When a new subdirectory is created it gets watched by its own JobCoordinator. When a subdirectory is deleted the JobCoordinator of this directory is destroyed. When a subdirectory is renamed the JobCoordinator for the old name is removed and a new one is created.
| Constructor and Description |
|---|
ObserverCoordinator(java.lang.String path)
Create the ObserverCoordinator and add a Watch for all subdirectories.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.io.File pathname)
Filter which accepts only directories.
|
void |
fileChange(FilePollerEvent event)
Listener for FilePollerEvents.
|
static boolean |
isReconnecting() |
static void |
shutdown() |
void |
start(FileObserver fileObserver) |
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic ObserverCoordinator(java.lang.String path)
fileObserver - Name of directory to watch.path - Root directory of watched pathspublic void start(FileObserver fileObserver)
public void fileChange(FilePollerEvent event)
fileChange in interface FilePollerListenerInterfaceevent - The event of the change.#com.highqsoft.util.FilePollerEvent,
#com.highqsoft.util.FilePollerpublic boolean accept(java.io.File pathname)
accept in interface java.io.FileFilterpathname - Name of path to checkpublic static boolean isReconnecting()
public static void shutdown()