imario 2004/10/12 06:16:23
Modified: vfs/src/java/org/apache/commons/vfs/impl
DefaultFileMonitor.java
Log:
javadoc fixes
Revision Changes Path
1.2 +34 -42
jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
Index: DefaultFileMonitor.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultFileMonitor.java 11 Oct 2004 19:27:53 -0000 1.1
+++ DefaultFileMonitor.java 12 Oct 2004 13:16:23 -0000 1.2
@@ -31,47 +31,39 @@
/**
- * Implementation Documentation
- * ============================
- *
- * The FileMonitor is a Thread based polling file system monitor with a 1 second
delay.
- *
- * Design:
- * There is a Map of monitors known as FileMonitorAgents. With the thread running,
- * each FileMonitorAgent object is asked to "check" on the file it is responsible
for.
- * To do this check, the cache is cleared. If the file existed before the refresh
and
- * it no longer exists, a delete event is fired. If the file existed before the
refresh
- * and it still exists, check the last modified timestamp to see if that has
changed.
- * If it has, fire a change event (BUG no change event, fires a create event
instead).
- * With each file delete, the FileMonitorAgent of the parent is asked to re-build
its
- * list of children, so that they can be accurately checked when there are new
children.
- * New files are detected during each "check" as each file does a check for new
children.
- * If new children are found, create events are fired recursively if recursive
descent is
- * enabled.
- *
- * Example usage:
-
- try {
- FileSystemManager fsManager = VFS.getManager();
- FileObject listendir = fsManager.resolveFile("/home/username/monitored/");
-
- DefaultFileMonitor fm = new DefaultFileMonitor(new CustomFileListener());
- fm.setRecursive(true);
- fm.addFile(listendir);
- fm.start();
- }
- catch (FileSystemException fse)
- {
- fse.printStackTrace();
- }
-
- *
- * where CustomFileSystemListener is a class that implements the FileListener
interface.
- */
-
-
-/**
- * A polling FileMonitor implementation.
+ * A polling [EMAIL PROTECTED] FileMonitor} implementation.<br />
+ * <br />
+ * The DefaultFileMonitor is a Thread based polling file system monitor with a 1
second delay.<br />
+ * <br />
+ * <b>Design:</b>
+ * <p/>
+ * There is a Map of monitors known as FileMonitorAgents. With the thread running,
+ * each FileMonitorAgent object is asked to "check" on the file it is responsible
for.
+ * To do this check, the cache is cleared.
+ * </p>
+ * <ul>
+ * <li>If the file existed before the refresh and it no longer exists, a delete
event is fired.
+ * <li>If the file existed before the refresh and it still exists, check the last
modified timestamp to see if that has changed.
+ * <li>If it has, fire a change event.
+ * </ul>
+ * <p/>
+ * With each file delete, the FileMonitorAgent of the parent is asked to re-build
its
+ * list of children, so that they can be accurately checked when there are new
children.<br/>
+ * New files are detected during each "check" as each file does a check for new
children.
+ * If new children are found, create events are fired recursively if recursive
descent is
+ * enabled.
+ * </p>
+ * <p/>
+ * <br /><b>Example usage:</b><pre>
+ * FileSystemManager fsManager = VFS.getManager();
+ * FileObject listendir = fsManager.resolveFile("/home/username/monitored/");
+ * <p/>
+ * DefaultFileMonitor fm = new DefaultFileMonitor(new CustomFileListener());
+ * fm.setRecursive(true);
+ * fm.addFile(listendir);
+ * fm.start();
+ * </pre>
+ * <i>(where CustomFileListener is a class that implements the FileListener
interface.)</i>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Christopher Ottley</a>
* @version $Revision$ $Date$
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]