|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.facilities.AlarmLevel
public final class AlarmLevel
This class defines an enumerated type for the alarm levels supported by the Alarm Facility. The alarm levels match those defined by ITU X.733.
A singleton instance of each enumerated value is guaranteed (via an implementation
of readResolve() - refer java.io.Serializable),
so that equality tests using == are always evaluated correctly. (This
equality test is only guaranteed if this class is loaded in the application's boot class
path, rather than dynamically loaded at runtime.)
The alarm levels, in order of relative severity, are:
| Field Summary | |
|---|---|
static AlarmLevel |
CLEAR
Alarm level used when an error condition has cleared. |
static java.lang.String |
CLEAR_STRING
A string representation of CLEAR. |
static AlarmLevel |
CRITICAL
Alarm level used for critical error conditions. |
static java.lang.String |
CRITICAL_STRING
A string representation of CRITICAL. |
static AlarmLevel |
INDETERMINATE
Alarm level used when the severity of the error condition is unknown. |
static java.lang.String |
INDETERMINATE_STRING
A string representation of INDETERMINATE. |
static int |
LEVEL_CLEAR
An integer representation of CLEAR. |
static int |
LEVEL_CRITICAL
An integer representation of CRITICAL. |
static int |
LEVEL_INDETERMINATE
An integer representation of INDETERMINATE. |
static int |
LEVEL_MAJOR
An integer representation of MAJOR. |
static int |
LEVEL_MINOR
An integer representation of MINOR. |
static int |
LEVEL_WARNING
An integer representation of WARNING. |
static AlarmLevel |
MAJOR
Alarm level used for error conditions of major severity. |
static java.lang.String |
MAJOR_STRING
A string representation of MAJOR. |
static AlarmLevel |
MINOR
Alarm level used for error conditions of minor severity. |
static java.lang.String |
MINOR_STRING
A string representation of MINOR. |
static AlarmLevel |
WARNING
Alarm level used to indicate alarm warning conditions. |
static java.lang.String |
WARNING_STRING
A string representation of WARNING. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Compare this alarm level for equality with another. |
static AlarmLevel |
fromInt(int level)
Get an AlarmLevel object from an integer value. |
static AlarmLevel |
fromString(java.lang.String level)
Get an AlarmLevel object from a string value. |
int |
hashCode()
Get a hash code value for this alarm level. |
boolean |
isClear()
Determine if this AlarmLevel object represents the CLEAR alarm level. |
boolean |
isCritical()
Determine if this AlarmLevel object represents the CRITICAL alarm level. |
boolean |
isHigherLevel(AlarmLevel other)
Determine if this AlarmLevel object represents a level that is higher than some other AlarmLevel object. |
boolean |
isIndeterminate()
Determine if this AlarmLevel object represents the INDETERMINATE alarm level. |
boolean |
isMajor()
Determine if this AlarmLevel object represents the MAJOR alarm level. |
boolean |
isMinor()
Determine if this AlarmLevel object represents the MINOR alarm level. |
boolean |
isWarning()
Determine if this AlarmLevel object represents the WARNING alarm level. |
int |
toInt()
Get an integer value representation for this AlarmLevel object. |
java.lang.String |
toString()
Get the textual representation of this alarm level object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LEVEL_CLEAR
CLEAR.
public static final int LEVEL_CRITICAL
CRITICAL.
public static final int LEVEL_MAJOR
MAJOR.
public static final int LEVEL_WARNING
WARNING.
public static final int LEVEL_INDETERMINATE
INDETERMINATE.
public static final int LEVEL_MINOR
MINOR.
public static final java.lang.String CLEAR_STRING
CLEAR.
public static final java.lang.String CRITICAL_STRING
CRITICAL.
public static final java.lang.String MAJOR_STRING
MAJOR.
public static final java.lang.String WARNING_STRING
WARNING.
public static final java.lang.String INDETERMINATE_STRING
INDETERMINATE.
public static final java.lang.String MINOR_STRING
MINOR.
public static final AlarmLevel CLEAR
public static final AlarmLevel CRITICAL
public static final AlarmLevel MAJOR
public static final AlarmLevel WARNING
public static final AlarmLevel INDETERMINATE
public static final AlarmLevel MINOR
| Method Detail |
|---|
public static AlarmLevel fromInt(int level)
throws java.lang.IllegalArgumentException
AlarmLevel object from an integer value.
level - the level as an integer.
AlarmLevel object corresponding to level.
java.lang.IllegalArgumentException - if level is not a valid alarm
level value.
public static AlarmLevel fromString(java.lang.String level)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException
AlarmLevel object from a string value.
level - the level as a string, for example as returned by the toString()
method (case insensitive).
AlarmLevel object corresponding to level.
java.lang.NullPointerException - if level is null.
java.lang.IllegalArgumentException - if level is not a valid alarm
level string.public int toInt()
AlarmLevel object.
AlarmLevel object.public boolean isClear()
This method is effectively equivalent to the conditional test:
(this == CLEAR), ie. the code:
if (alarmLevel.isClear()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.CLEAR) ...
true if this object represents the CLEAR alarm level,
false otherwise.public boolean isCritical()
This method is effectively equivalent to the conditional test:
(this == CRITICAL), ie. the code:
if (alarmLevel.isCritical()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.CRITICAL) ...
true if this object represents the CRITICAL alarm level,
false otherwise.public boolean isMajor()
This method is effectively equivalent to the conditional test:
(this == MAJOR), ie. the code:
if (alarmLevel.isMajor()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.MAJOR) ...
true if this object represents the MAJOR alarm level,
false otherwise.public boolean isWarning()
This method is effectively equivalent to the conditional test:
(this == WARNING), ie. the code:
if (alarmLevel.isWarning()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.WARNING) ...
true if this object represents the WARNING alarm level,
false otherwise.public boolean isIndeterminate()
This method is effectively equivalent to the conditional test:
(this == INDETERMINATE), ie. the code:
if (alarmLevel.isIndeterminate()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.INDETERMINATE) ...
true if this object represents the INDETERMINATE alarm level,
false otherwise.public boolean isMinor()
This method is effectively equivalent to the conditional test:
(this == MINOR), ie. the code:
if (alarmLevel.isMinor()) ...
is interchangeable with the code:
if (alarmLevel == AlarmLevel.MINOR) ...
true if this object represents the MINOR alarm level,
false otherwise.
public boolean isHigherLevel(AlarmLevel other)
throws java.lang.NullPointerException
other - the AlarmLevel object to compare this with.
true if the level represented by this AlarmLevel
object is considered a higher level than the level represented by the specified
AlarmLevel object, false otherwise.
java.lang.NullPointerException - if other is null.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare this with.
true if obj is an instance of this class
representing the same alarm level as this, false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||