1 |
tdb |
1.1 |
//---PACKAGE DECLARATION--- |
2 |
|
|
package uk.ac.ukc.iscream.client.monitors; |
3 |
|
|
|
4 |
|
|
//---IMPORTS--- |
5 |
|
|
import uk.ac.ukc.iscream.client.*; |
6 |
|
|
import uk.ac.ukc.iscream.core.*; |
7 |
|
|
import uk.ac.ukc.iscream.util.*; |
8 |
|
|
import uk.ac.ukc.iscream.componentmanager.*; |
9 |
|
|
|
10 |
|
|
/** |
11 |
|
|
* This Monitor watches the CPU load for all machines |
12 |
|
|
* |
13 |
|
|
* @author $Author$ |
14 |
|
|
* @version $Id$ |
15 |
|
|
*/ |
16 |
|
|
public class CPU__Monitor implements Monitor { |
17 |
|
|
|
18 |
|
|
//---FINAL ATTRIBUTES--- |
19 |
|
|
|
20 |
|
|
/** |
21 |
|
|
* The current CVS revision of this class |
22 |
|
|
*/ |
23 |
|
|
public final String REVISION = "$Revision: 1.1 $"; |
24 |
|
|
|
25 |
|
|
public final String DESC = "Monitors CPU."; |
26 |
|
|
|
27 |
|
|
//---STATIC METHODS--- |
28 |
|
|
|
29 |
|
|
//---CONSTRUCTORS--- |
30 |
|
|
|
31 |
|
|
//---PUBLIC METHODS--- |
32 |
|
|
|
33 |
|
|
public void analysePacket(XMLPacket packet) { |
34 |
|
|
// yeah, now what ? |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
/** |
38 |
|
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
39 |
|
|
* method to provide clean logging (every class should have this). |
40 |
|
|
* |
41 |
|
|
* This uses the uk.ac.ukc.iscream.util.NameFormat class |
42 |
|
|
* to format the toString() |
43 |
|
|
* |
44 |
|
|
* @return the name of this class and its CVS revision |
45 |
|
|
*/ |
46 |
|
|
public String toString() { |
47 |
|
|
return FormatName.getName( |
48 |
|
|
_name, |
49 |
|
|
getClass().getName(), |
50 |
|
|
REVISION); |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
/** |
54 |
|
|
* return the String representation of what the filter does |
55 |
|
|
*/ |
56 |
|
|
public String getDescription(){ |
57 |
|
|
return DESC; |
58 |
|
|
} |
59 |
|
|
|
60 |
|
|
//---PRIVATE METHODS--- |
61 |
|
|
|
62 |
|
|
//---ACCESSOR/MUTATOR METHODS--- |
63 |
|
|
|
64 |
|
|
//---ATTRIBUTES--- |
65 |
|
|
|
66 |
|
|
/** |
67 |
|
|
* This is the friendly identifier of the |
68 |
|
|
* component this class is running in. |
69 |
|
|
* eg, a Filter may be called "filter1", |
70 |
|
|
* If this class does not have an owning |
71 |
|
|
* component, a name from the configuration |
72 |
|
|
* can be placed here. This name could also |
73 |
|
|
* be changed to null for utility classes. |
74 |
|
|
*/ |
75 |
|
|
private String _name = ClientMain.NAME; |
76 |
|
|
|
77 |
|
|
/** |
78 |
|
|
* This holds a reference to the |
79 |
|
|
* system logger that is being used. |
80 |
|
|
*/ |
81 |
|
|
private Logger _logger = ReferenceManager.getInstance().getLogger(); |
82 |
|
|
|
83 |
|
|
//---STATIC ATTRIBUTES--- |
84 |
|
|
|
85 |
|
|
} |