|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mccrory.scott.spumoni.StatsValue
StatsValue
is a data object for a statistics program's single value.
It also contains related attributes such as name, value, SNMP OID, trap min
and trap max.
Constructor Summary | |
StatsValue()
Basic StatsValue constructor. |
|
StatsValue(java.lang.String newValueName,
java.lang.String newSnmpOid,
int newSnmpTrapMin,
int newSnmpTrapMax)
A convenience StatsValue contructor to set all of the data elements at time of creation. |
Method Summary | |
java.lang.Object |
clone()
We override the clone method here to prevent cloning of our class. |
java.lang.String |
getSnmpOid()
Returns the SNMP OID. |
int |
getSnmpTrapMax()
Returns the max acceptable value before an SMTP trap is sent. |
int |
getSnmpTrapMin()
Returns the min acceptable value before an SMTP trap is sent. |
java.lang.String |
getValue()
Gets the program value's actual collected value. |
java.lang.String |
getValueName()
Returns the value name. |
boolean |
isUnset()
Returns whether value is unset. |
void |
setSnmpOid(java.lang.String newSnmpOid)
Sets the SNMP OID. |
void |
setSnmpTrapMax(int newSnmpTrapMax)
Sets the max acceptable value before an SMTP trap is sent. |
void |
setSnmpTrapMin(int newSnmpTrapMin)
Sets the min acceptable value before an SMTP trap is sent. |
void |
setValue(java.lang.String newValue)
Sets the program value's actual collected value. |
void |
setValueName(java.lang.String newValueName)
Sets the value name. |
java.lang.String |
toString()
Returns a formatted String of this object's values |
void |
unset()
Unsets the value |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StatsValue()
public StatsValue(java.lang.String newValueName, java.lang.String newSnmpOid, int newSnmpTrapMin, int newSnmpTrapMax)
newValueName
- The name of this stats valuenewSnmpOid
- The SNMP OIDnewSnmpTrapMin
- The minimum value before sending an SNMP TrapnewSnmpTrapMax
- The maximum value before sending an SNMP TrapMethod Detail |
public final java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
method here to prevent cloning of our class.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- To indicate cloning is not allowedpublic java.lang.String getSnmpOid()
public int getSnmpTrapMax()
public int getSnmpTrapMin()
public java.lang.String getValue()
public java.lang.String getValueName()
public boolean isUnset()
public void setSnmpOid(java.lang.String newSnmpOid)
newSnmpOid
- java.lang.Stringpublic void setSnmpTrapMax(int newSnmpTrapMax)
newSnmpTrapMax
- intpublic void setSnmpTrapMin(int newSnmpTrapMin)
newSnmpTrapMin
- intpublic void setValue(java.lang.String newValue)
newValue
- java.lang.Stringpublic void setValueName(java.lang.String newValueName)
newValueName
- java.lang.Stringpublic java.lang.String toString()
toString
in class java.lang.Object
public void unset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |