org.moremotion.cache
Class FileChangeDetector

java.lang.Object
  extended by org.moremotion.cache.FileChangeDetector
All Implemented Interfaces:
java.lang.Runnable

public class FileChangeDetector
extends java.lang.Object
implements java.lang.Runnable

Responsible for registered MoreMotion files change detection.

Version:
$Id: FileChangeDetector.java 51 2008-03-10 11:46:54Z erkan $

Method Summary
 void addFile(java.io.File f, FileChangeNotification fcn)
          Adds a file.
 void addFile(java.io.File f, FileChangeNotification fcn, java.io.File rf)
          Adds a file.
 void finalize()
           
static FileChangeDetector getInstance()
          Returns a single instance of FileChangeDetector class.
 void removeFile(java.io.File f, FileChangeNotification fcn, java.io.File rf)
           
 void run()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FileChangeDetector getInstance()
Returns a single instance of FileChangeDetector class.


addFile

public void addFile(java.io.File f,
                    FileChangeNotification fcn)
Adds a file.

Parameters:
f - File to be checked for modification.
fcn - FileChangeNotification object which will be called back when the file has been changed.

addFile

public void addFile(java.io.File f,
                    FileChangeNotification fcn,
                    java.io.File rf)
Adds a file.

Parameters:
f - File to be checked for modification.
fcn - FileChangeNotification object which will be called back when the file has been changed.
rf - Return file. This parameter can be used to group the files so that they are processed if any of the files in the group changes.

removeFile

public void removeFile(java.io.File f,
                       FileChangeNotification fcn,
                       java.io.File rf)

run

public void run()
Specified by:
run in interface java.lang.Runnable

stop

public void stop()

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object


Copyright © 2002-2008 MOR YAZILIM. All Rights Reserved.