01: /**
02: *
03: */package clime.messadmin.model;
04:
05: import java.io.File;
06: import java.util.Date;
07: import java.util.List;
08: import java.util.Map;
09:
10: /**
11: * @author Cédrik LIME
12: */
13: public interface IServerInfo {
14:
15: /**
16: * @return server-specific data (user plugin)
17: */
18: public List/*<Map.Entry<String, String>>*/getServerSpecificData();
19:
20: /**
21: * @return startup time of this server
22: */
23: public Date getStartupTime();
24:
25: /**
26: * @since 1.4
27: * @see Runtime#getMaxMemory()
28: */
29: public long getMaxMemory();
30:
31: /**
32: * @see Runtime#freeMemory()
33: */
34: public long getFreeMemory();
35:
36: /**
37: * @see Runtime#totalMemory()
38: */
39: public long getTotalMemory();
40:
41: /**
42: * @since 1.4
43: * @see Runtime#availableProcessors()
44: */
45: public int getCpuCount();
46:
47: public Map/*<String,String>*/getSystemProperties();
48:
49: /**
50: * @since 1.5
51: * @see System#getenv()
52: */
53: public Map/*<String,String>*/getSystemEnv();
54:
55: /**
56: * @return number of bytes available on the partition and includes checks for write permissions and other operating system restrictions
57: * @since 1.6
58: * @see File#getUsableSpace()
59: */
60: public long getUsableSpaceForFile(String fileName);
61:
62: /**
63: * @return number of bytes available on the partition and includes checks for write permissions and other operating system restrictions
64: * @since 1.6
65: * @see File#getUsableSpace()
66: */
67: public long getUsableSpaceForFile(File file);
68:
69: /*
70: public String getServerInfo();
71: */
72:
73: /**
74: * @see System#gc()
75: */
76: public void gc();
77: }
|