public class DirectoryMonitor extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DirectoryMonitor.Listener
Allows custom behavior to be hooked up to process file state changes.
|
| Constructor and Description |
|---|
DirectoryMonitor(File target,
DirectoryMonitor.Listener listener,
long pollIntervalMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(File file) |
DirectoryMonitor.Listener |
getListener() |
long |
getPollIntervalMillis() |
File |
getTarget() |
void |
removeFile(File file) |
void |
scan()
Looks for changes to the immediate contents of the directory we're watching.
|
void |
start() |
void |
stop() |
public static final Logger logger
public DirectoryMonitor(File target, DirectoryMonitor.Listener listener, long pollIntervalMillis)
public long getPollIntervalMillis()
public File getTarget()
public DirectoryMonitor.Listener getListener()
public void stop()
public void start()
public void addFile(File file)
public void removeFile(File file)
public void scan()
Copyright © 1999–2014 The Apache Software Foundation. All rights reserved.