public class AlertSeverity extends Object implements Serializable
The levels in descending order are:
Modifier and Type | Field and Description |
---|---|
static AlertSeverity |
INFO
INFO is an alert severity indicating an informational alert.
|
static AlertSeverity |
SEVERE
SEVERE is an alert severity indicating a serious failure/situation.
|
static AlertSeverity |
WARNING
WARNING is an alert severity indicating a potential problem.
|
Modifier | Constructor and Description |
---|---|
protected |
AlertSeverity(String name,
int value)
Create a named alert severity with a given integer value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare two objects for value equality.
|
String |
getName()
Return the string name of the alert severity.
|
int |
getValue()
Get the integer value for this alert severity.
|
int |
hashCode()
Generate a hashcode.
|
boolean |
isInfo() |
boolean |
isSevere() |
boolean |
isWarning() |
static AlertSeverity |
parse(int value)
Returns an AlertSeverity by it's value (see
getValue() ). |
static AlertSeverity |
parse(String name)
Returns an AlertSeverity by it's name (see
getName() ). |
String |
toString() |
public static final AlertSeverity SEVERE
SEVERE alerts should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators.
This severity is initialized to 1000
.
public static final AlertSeverity WARNING
WARNING alerts should describe events that will be of interest to end users or system managers, or which indicate potential problems.
This severity is initialized to 900
.
public static final AlertSeverity INFO
INFO severity will typically be used when 'resolving' an alert, for which it's previous severity is either unknown or unimportant.
This severity is initialized to 800
.
protected AlertSeverity(String name, int value)
Note that this constructor is
"protected" to allow subclassing. In general it is sufficient to use one of the constant
Level objects such as WARNING
or SEVERE
. However, if there is a need to add
a new alert severity, this call may be subclassed and new constants can be defined.
name
- the name of the alert severity, for example "SEVERE".value
- an integer value for the severity.public String getName()
public int getValue()
public boolean isSevere()
true
if this is a SEVERE
alert severity.public boolean isWarning()
true
if this is a WARNING
alert severity.public boolean isInfo()
true
if this is an INFO
alert severity.public static AlertSeverity parse(String name)
getName()
).name
- representing this severity.IllegalArgumentException
- if an unknown severity was requested.public static AlertSeverity parse(int value)
getValue()
).value
- representing this severity.IllegalArgumentException
- if an unknown severity was requested.public boolean equals(Object obj)
public int hashCode()
Copyright © GigaSpaces.