|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.apache.jetspeed.services.registry.RegistryWatcher
Monitors a Registry directory and notifies the associated Registry of file updates.
Field Summary | |
static int |
SCAN_RATE
Minimum scan rate for evaluating file refresh |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
RegistryWatcher()
Creates a default RegistryWatcher |
Method Summary | |
void |
changeBase(java.io.File f)
Change the base file or directory to be monitored by this watcher |
java.io.FileFilter |
getFilter()
|
long |
getRefreshRate()
|
FileRegistry |
getSubscriber()
|
void |
run()
Main routine for the monitor which periodically checks whether the filex have been modified. |
void |
setDone()
Mark that the watching thread should be stopped |
void |
setFilter(java.io.FileFilter filter)
Sets the file filter for selecting the registry files |
void |
setRefreshRate(long refresh)
Sets the refresh rate for this watcher |
void |
setSubscriber(FileRegistry registry)
Modifies the subscriber to this Watcher |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SCAN_RATE
Constructor Detail |
public RegistryWatcher()
Method Detail |
public void setSubscriber(FileRegistry registry)
registry
- the new registry subscriberpublic FileRegistry getSubscriber()
public void setRefreshRate(long refresh)
refresh
- the refresh rate in secondspublic long getRefreshRate()
public void setFilter(java.io.FileFilter filter)
filter
- the file filter to usepublic java.io.FileFilter getFilter()
public void changeBase(java.io.File f)
f
- the file or directory to monitorpublic void run()
Main routine for the monitor which periodically checks whether the filex have been modified.
The algorithm used does not guarantee a constant refresh rate between invocations.
public void setDone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |