10 |
|
* @author $Author$ |
11 |
|
* @version $Id$ |
12 |
|
*/ |
13 |
< |
class Alert { |
13 |
> |
public class Alert { |
14 |
|
|
15 |
|
//---FINAL ATTRIBUTES--- |
16 |
|
|
21 |
|
|
22 |
|
// DEFINE MORE ALERT LEVELS HERE |
23 |
|
public static final int OK = 0; |
24 |
+ |
public static final int WARNING = 1; |
25 |
+ |
public static final int FATAL = 2; |
26 |
|
|
27 |
+ |
public static final String[] alerts = {"OK", "WARNING", "FATAL"}; |
28 |
+ |
|
29 |
|
//---STATIC METHODS--- |
30 |
|
|
31 |
|
//---CONSTRUCTORS--- |
35 |
|
* |
36 |
|
* @param level the level of the alert |
37 |
|
*/ |
38 |
< |
public Alert(int level) { |
38 |
> |
public Alert(int level, String thresholdValue, String value, String attributeName) { |
39 |
|
_level = level; |
40 |
+ |
_thresholdValue = thresholdValue; |
41 |
+ |
_value = value; |
42 |
+ |
_attributeName = attributeName; |
43 |
|
} |
44 |
|
|
45 |
|
//---PUBLIC METHODS--- |
70 |
|
public int getLevel() { |
71 |
|
return _level; |
72 |
|
} |
73 |
+ |
|
74 |
+ |
public String getValue() { |
75 |
+ |
return _value; |
76 |
+ |
} |
77 |
+ |
|
78 |
+ |
public String getThresholdValue() { |
79 |
+ |
return _thresholdValue; |
80 |
+ |
} |
81 |
+ |
|
82 |
+ |
public String getAttributeName() { |
83 |
+ |
return _attributeName; |
84 |
+ |
} |
85 |
|
|
86 |
|
//---ATTRIBUTES--- |
87 |
|
|
100 |
|
* The alert level of this packet |
101 |
|
*/ |
102 |
|
private int _level; |
103 |
+ |
|
104 |
+ |
private String _value; |
105 |
+ |
private String _thresholdValue; |
106 |
+ |
private String _attributeName; |
107 |
|
|
108 |
|
//---STATIC ATTRIBUTES--- |
109 |
|
|