public class NetCheck
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static int |
FATAL
Fatal check severity.
|
static int |
WARNING
Non-fatal check severity.
|
Constructor and Description |
---|
NetCheck(int severityArg,
java.lang.String messageArg,
java.lang.Object objectArg)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Method to order by message when in TreeSet.
|
java.lang.String |
getMessage()
Getter for the error message
|
int |
getSeverity()
Getter for the error severity
|
java.lang.Object |
getSource()
Getter for the object that caused the error
|
boolean |
isFatal()
Method to see if this check is a FATAL.
|
boolean |
isWarning()
Method to see if this check is a WARNING.
|
void |
setMessage(java.lang.String message)
Setter for the error message
|
void |
setSeverity(int severity)
Setter for the error severity
|
void |
setSource(java.lang.Object source)
Setter for the object that caused the error
|
java.lang.String |
toString()
Produce a String representation of the check.
|
public static final int FATAL
public static final int WARNING
public NetCheck(int severityArg, java.lang.String messageArg, java.lang.Object objectArg)
severityArg
- the severity of the check. Should be FATAL or WARNING.messageArg
- the message assosiated with the check.objectArg
- the network component producing the check.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isWarning()
public boolean isFatal()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.Object getSource()
public void setSource(java.lang.Object source)
source
- the source objectpublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the error messagepublic int getSeverity()
public void setSeverity(int severity)
severity
- the error severity (either NetCheck.FATAL or NetCheck.WARNING)Submit Feedback to pmarrone@users.sourceforge.net