Package org.apache.commons.jci.monitor
Class FilesystemAlterationMonitor
- java.lang.Object
-
- org.apache.commons.jci.monitor.FilesystemAlterationMonitor
-
- All Implemented Interfaces:
java.lang.Runnable
public final class FilesystemAlterationMonitor extends java.lang.Object implements java.lang.RunnableIt's a runnable that spawns of a monitoring thread triggering the the observers and managing the their listeners.- Author:
- tcurdt
-
-
Constructor Summary
Constructors Constructor Description FilesystemAlterationMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(java.io.File pRoot, FilesystemAlterationListener pListener)FilesystemAlterationListener[]getListenersFor(java.io.File pRoot)voidremoveListener(FilesystemAlterationListener pListener)voidrun()voidsetInterval(long pDelay)Set the delay between calls to the observers.voidstart()voidstop()
-
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
setInterval
public void setInterval(long pDelay)
Set the delay between calls to the observers.- Parameters:
pDelay- the delay in milliseconds (default if not set 3000 ms)
-
addListener
public void addListener(java.io.File pRoot, FilesystemAlterationListener pListener)
-
removeListener
public void removeListener(FilesystemAlterationListener pListener)
-
getListenersFor
public FilesystemAlterationListener[] getListenersFor(java.io.File pRoot)
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
-