org.openi.util
Class FileChangeWatcher

java.lang.Object
  extended byjava.util.TimerTask
      extended byorg.openi.util.FileChangeWatcher
All Implemented Interfaces:
java.lang.Runnable

public abstract class FileChangeWatcher
extends java.util.TimerTask

Version:
$Revision: 1.1.1.2 $ $Date: 2005/07/11 17:58:37 $ Abstract class that defines functionalities to detect file modification.
Author:
Uddhab Pant

Constructor Summary
FileChangeWatcher(java.io.File file)
          Constructor initializes file.
 
Method Summary
protected abstract  void onChange(java.io.File file)
          Fired when the file is modified.
 void run()
          A thread is launched to check the lastModified value and compare it with the previous value.
 
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

FileChangeWatcher

public FileChangeWatcher(java.io.File file)
Constructor initializes file.

Parameters:
file - File
Method Detail

run

public final void run()
A thread is launched to check the lastModified value and compare it with the previous value.


onChange

protected abstract void onChange(java.io.File file)
Fired when the file is modified.

Parameters:
file - File