25 |
|
|
26 |
|
public static final String[] thresholdLevels = {"NORMAL", "LOWER", "UPPER"}; |
27 |
|
|
28 |
+ |
// not OK and FINAL MUST be present...at the beginning and the end |
29 |
+ |
|
30 |
|
public static final int alertOK = 0; |
31 |
|
public static final int alertNOTICE = 1; |
32 |
|
public static final int alertWARNING = 2; |
47 |
|
* |
48 |
|
* @param level the level of the alert |
49 |
|
*/ |
50 |
< |
public Alert(int alertLevel, int lastAlert, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert) { |
50 |
> |
public Alert(int alertLevel, int lastAlert, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert, long initialAlertTime) { |
51 |
|
_alertLevel = alertLevel; |
52 |
|
_lastAlert = lastAlert; |
53 |
|
_thresholdLevel = thresholdLevel; |
56 |
|
_value = value; |
57 |
|
_attributeName = attributeName; |
58 |
|
_timeTillNextAlert = timeTillNextAlert; |
59 |
+ |
_initialAlertTime = initialAlertTime; |
60 |
|
} |
61 |
|
|
62 |
|
//---PUBLIC METHODS--- |
115 |
|
public String getTimeTillNextAlert() { |
116 |
|
return _timeTillNextAlert; |
117 |
|
} |
118 |
+ |
|
119 |
+ |
public long getInitialAlertTime () { |
120 |
+ |
return _initialAlertTime; |
121 |
+ |
} |
122 |
|
|
123 |
|
//---ATTRIBUTES--- |
124 |
|
|
147 |
|
private String _thresholdValue; |
148 |
|
private String _attributeName; |
149 |
|
private String _timeTillNextAlert; |
150 |
+ |
|
151 |
+ |
private long _initialAlertTime; |
152 |
|
|
153 |
|
//---STATIC ATTRIBUTES--- |
154 |
|
|