KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > freecs > interfaces > IReloadable


1 /**
2  * Copyright (C) 2003 Manfred Andres
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */

18 package freecs.interfaces;
19
20 import java.io.File JavaDoc;
21
22 public interface IReloadable {
23     /**
24      * used to retrieve the File-object, which will be checked for the last-modified stamp
25      * @return The File to watch for reloadability
26      */

27     public abstract File JavaDoc getFile ();
28     /**
29      * returns true if the file was present within the last check
30      * @return true if the file was present within the last check
31      */

32     public abstract boolean filePresent();
33     /**
34      * returns the lastModified-time of the last check
35      * @return the lastModified-time of the last check
36      */

37     public abstract long lastModified ();
38     /**
39      * This method will be called if the FileMonitor comes to the conclusion
40      * that the file was changed
41      */

42     public abstract void changed ();
43     /**
44      * This method will be called if the FileMonitor comes to the conclusion
45      * that the file was remove
46      */

47     public abstract void removed ();
48     /**
49      * This method will be called if the FileMonitor comes to the conclusion
50      * that the file was created
51      */

52     public abstract void created ();
53 }
Popular Tags