|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.web.category.Category
Adapts the functionality of the category definition and RTC category updates into one simple interface. Also adds many convenience methods.
The category definition is read from the categories.xml file by the
CategoryFactory
. The
RTC category updates are periodically sent from the RTC to the WebUI.
Field Summary | |
protected Category |
categoryDef
The category definition (from the categories.xml file). |
protected java.util.Date |
lastUpdated
The last time this category was updated. |
protected Category |
rtcCategory
An update from the RTC about the service level availability for this category. |
protected java.lang.Long |
serviceCount
A cached value of the total number of services on nodes belonging to this category. |
protected java.lang.Long |
serviceDownCount
A cached value of the total number of services on nodes belonging to this category that are currently down. |
Constructor Summary | |
protected |
Category(Category categoryDef,
Category rtcCategory,
java.util.Date lastUpdated)
Create a new instance to wrapper information from the categories.xml file (that defines a category) and information from the RTC (that gives current service level availability). |
Method Summary | |
java.util.Enumeration |
enumerateNode()
Returns an enumeration of the Castor-generated Node objects tied to this category. |
java.lang.String |
getComment()
Return a description explaining this category. |
java.util.Date |
getLastUpdated()
Return the date and time this category was last updated by the RTC. |
java.lang.String |
getName()
Return the unique name for this category. |
double |
getNormalThreshold()
Return the value considered to be the minimum "normal" value. |
(package private) Category |
getRtcCategory()
Package protected implementation method that exposes the internal representation (a Castor-generated object) of the data from the RTC, strictly for use in marshalling the data back to XML (via Castor). |
long |
getServiceCount()
Return the number of services contained within this category. |
protected static long[] |
getServiceCounts(Category category)
Convenience method to count the number of services under a category and the number of those services that are currently down. |
long |
getServiceDownCount()
Return the number of services that are currently down with this category. |
double |
getValue()
Return the current service level availability for this category. |
double |
getWarningThreshold()
Return the value considered to be the minimum value below the "normal" value where only a warning is necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Category categoryDef
protected Category rtcCategory
protected java.util.Date lastUpdated
protected java.lang.Long serviceCount
protected java.lang.Long serviceDownCount
Constructor Detail |
protected Category(Category categoryDef, Category rtcCategory, java.util.Date lastUpdated)
Method Detail |
public java.lang.String getName()
public double getNormalThreshold()
public double getWarningThreshold()
public java.lang.String getComment()
public java.util.Date getLastUpdated()
public double getValue()
Category getRtcCategory()
public long getServiceCount()
public long getServiceDownCount()
public java.util.Enumeration enumerateNode()
Note, LJK Dec 5,2001: I'm not really happy about exposing the Castor objects this way. We do it all over the place, but I've already started hiding them in this particular case (the rtceui.xsd objects). I'm not very pleased with this half approach. I'd rather hide them completely or not at all, but I don't want to introduce a new pass-through object.
protected static long[] getServiceCounts(Category category)
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |