org.wamblee.io
Class DirectoryMonitor

java.lang.Object
  extended by org.wamblee.io.DirectoryMonitor

public class DirectoryMonitor
extends java.lang.Object

Monitors a directory for changes.

Author:
Erik Brakkee

Nested Class Summary
static interface DirectoryMonitor.Listener
           
 
Constructor Summary
DirectoryMonitor(java.io.File aDirectory, java.io.FileFilter aFilefilter, DirectoryMonitor.Listener aListener)
           
 
Method Summary
 void poll()
          Polls the directory for changes and notifies the listener of any changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryMonitor

public DirectoryMonitor(java.io.File aDirectory,
                        java.io.FileFilter aFilefilter,
                        DirectoryMonitor.Listener aListener)
Method Detail

poll

public void poll()
Polls the directory for changes and notifies the listener of any changes. In case of any exceptions thrown by the listener while handling the changes, the next call to this method will invoked the listeners again for the same changes.



Copyright © 2010. All Rights Reserved.