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(java.lang.Object obj)
java.lang.String
getMetricIdentifier()
Get the metric identifier for the attribute to be used for NRTG collectionjava.lang.Number
getNumericValue()
getNumericValuejava.lang.String
getStringValue()
getStringValueSnmpValue
getValue()
getValueint
hashCode()
hashCodevoid
storeAttribute(Persister persister)
Stores the attribute using the persister.java.lang.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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
hashCode
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a int.
-
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 java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
getMetricIdentifier
public java.lang.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 java.lang.Number getNumericValue()
getNumericValue
- Specified by:
getNumericValue
in interfaceCollectionAttribute
- Specified by:
getNumericValue
in classAbstractCollectionAttribute
- Returns:
- a
String
object.
-
getStringValue
public java.lang.String getStringValue()
getStringValue
- Specified by:
getStringValue
in interfaceCollectionAttribute
- Specified by:
getStringValue
in classAbstractCollectionAttribute
- Returns:
- a
String
object.
-
-