com.anthonyeden.lib.resource
Class ResourceVFSMonitor

java.lang.Object
  extended bycom.anthonyeden.lib.resource.ResourceVFSMonitor
All Implemented Interfaces:
ResourceMonitor, java.lang.Runnable

public class ResourceVFSMonitor
extends java.lang.Object
implements java.lang.Runnable, ResourceMonitor

Monitors the given File for changes.

Author:
Anthony Eden

Constructor Summary
ResourceVFSMonitor(org.apache.commons.vfs.FileObject file, int delay, ResourceRecipient handler)
          Construct a ResourceFileMonitor for the given file.
 
Method Summary
 void run()
          The thread's run method.
 void startMonitor()
          Start the monitoring thread.
 void stopMonitor()
          Stop the monitoring thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceVFSMonitor

public ResourceVFSMonitor(org.apache.commons.vfs.FileObject file,
                          int delay,
                          ResourceRecipient handler)
Construct a ResourceFileMonitor for the given file.

Parameters:
file - The file
delay - The delay
handler - The handler ?
Method Detail

startMonitor

public void startMonitor()
Start the monitoring thread. If the thread is already running then this method will not attempt to start a new thread.

Specified by:
startMonitor in interface ResourceMonitor

stopMonitor

public void stopMonitor()
Stop the monitoring thread. If the monitoring thread is not running then this method will do nothing.

Specified by:
stopMonitor in interface ResourceMonitor

run

public void run()
The thread's run method. This method should not be executed directly nor should a thread be manually created, rather the startMonitor() and stopMonitor() methods should be used to start and stop the monitor.

Specified by:
run in interface java.lang.Runnable


Copyright (c) 2000-2003 Anthony Eden. All Rights Reserved.