DLESE Tools
v1.2

org.dlese.dpc.util
Class FileDirectoryMonitor

java.lang.Object
  extended byjava.util.TimerTask
      extended byorg.dlese.dpc.util.FileDirectoryMonitor
All Implemented Interfaces:
Runnable

public class FileDirectoryMonitor
extends TimerTask


Constructor Summary
FileDirectoryMonitor()
           
 
Method Summary
 void addListener(FileDirectoryListener listener)
          Add a FileDirectoryListener to this FileDirectoryMonitor.
protected  void fireFileDirectoryEvent(List filesToAdd, List filesToRemove)
          Construct the FileDirectoryEvent object and fire off the event to listeners.
 boolean init(String directoryName, long period, boolean asDaemon)
           
 boolean init(String directoryName, String directoryDataDir, long period, boolean asDaemon)
           
 void removeListener(FileDirectoryListener listener)
          Remove a FileDirectoryListener from this FileDirectoryMonitor.
 void run()
           
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDirectoryMonitor

public FileDirectoryMonitor()
Method Detail

init

public boolean init(String directoryName,
                    long period,
                    boolean asDaemon)

init

public boolean init(String directoryName,
                    String directoryDataDir,
                    long period,
                    boolean asDaemon)

run

public void run()

addListener

public void addListener(FileDirectoryListener listener)
Add a FileDirectoryListener to this FileDirectoryMonitor.

Parameters:
listener - The listener to add

removeListener

public void removeListener(FileDirectoryListener listener)
Remove a FileDirectoryListener from this FileDirectoryMonitor.

Parameters:
listener - The listener to remove

fireFileDirectoryEvent

protected void fireFileDirectoryEvent(List filesToAdd,
                                      List filesToRemove)
Construct the FileDirectoryEvent object and fire off the event to listeners.


DLESE Tools
v1.2