Package org.opennms.netmgt.collectd
Class SnmpAttribute
- java.lang.Object
-
- org.opennms.netmgt.collection.support.AbstractCollectionAttribute
-
- org.opennms.netmgt.collectd.SnmpAttribute
-
- All Implemented Interfaces:
CollectionAttribute
,CollectionVisitable
,Persistable
- Direct Known Subclasses:
AliasedAttribute
public class SnmpAttribute extends AbstractCollectionAttribute
SnmpAttribute class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
LOG
-
Fields inherited from class org.opennms.netmgt.collection.support.AbstractCollectionAttribute
m_attribType, m_resource
-
-
Constructor Summary
Constructors Constructor Description SnmpAttribute(CollectionResource resource, SnmpAttributeType type, SnmpValue val)
Constructor for SnmpAttribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getMetricIdentifier()
Get the metric identifier for the attribute to be used for NRTG collectionNumber
getNumericValue()
getNumericValueString
getStringValue()
getStringValueSnmpValue
getValue()
getValueint
hashCode()
hashCodevoid
storeAttribute(Persister persister)
Stores the attribute using the persister.String
toString()
toString-
Methods inherited from class org.opennms.netmgt.collection.support.AbstractCollectionAttribute
getAttributeType, getName, getResource, getType, shouldPersist, visit
-
-
-
-
Constructor Detail
-
SnmpAttribute
public SnmpAttribute(CollectionResource resource, SnmpAttributeType type, SnmpValue val)
Constructor for SnmpAttribute.
- Parameters:
resource
- aCollectionResource
object.type
- aSnmpAttributeType
object.val
- aSnmpValue
object.
-
-
Method Detail
-
storeAttribute
public void storeAttribute(Persister persister)
Stores the attribute using the persister. Not sure this should be here...- Specified by:
storeAttribute
in interfaceCollectionAttribute
- Overrides:
storeAttribute
in classAbstractCollectionAttribute
- Parameters:
persister
- aorg.opennms.netmgt.collectd.Persister
object.
-
toString
public String toString()
toString
-
getMetricIdentifier
public String getMetricIdentifier()
Description copied from interface:CollectionAttribute
Get the metric identifier for the attribute to be used for NRTG collection- Returns:
- the metric identifier
-
getNumericValue
public Number getNumericValue()
getNumericValue
- Specified by:
getNumericValue
in interfaceCollectionAttribute
- Specified by:
getNumericValue
in classAbstractCollectionAttribute
- Returns:
- a
String
object.
-
getStringValue
public String getStringValue()
getStringValue
- Specified by:
getStringValue
in interfaceCollectionAttribute
- Specified by:
getStringValue
in classAbstractCollectionAttribute
- Returns:
- a
String
object.
-
-