Package org.opennms.netmgt.collectd
Class SnmpAttributeType
- java.lang.Object
-
- org.opennms.netmgt.collection.support.AbstractCollectionAttributeType
-
- org.opennms.netmgt.collectd.SnmpAttributeType
-
- All Implemented Interfaces:
CollectionAttributeType
- Direct Known Subclasses:
HexStringAttributeType
,MibPropertyAttributeType
,NumericAttributeType
,StringAttributeType
public abstract class SnmpAttributeType extends AbstractCollectionAttributeType
Represents an OID to be collected (it might be specific or an indexed object). Also specific to a collection (e.g.: "default"), resource type (e.g.: node or interface), and attribute group (data collection group name, e.g.: "mib2-interfaces"). This is extended to create concrete classes that represent specific types of data to be stored such as numeric data ({@link (NumericAttributeType)}) or string data ({@link (StringAttributeType)}).- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SnmpAttributeType(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
Constructor for SnmpAttributeType.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SnmpAttributeType
create(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
createboolean
equals(Object obj)
equalsString
getAlias()
getAliasprotected String
getCollectionName()
getCollectionNamestatic List<Collectable>
getCollectionTrackers(Collection<SnmpAttributeType> objList)
getCollectionTrackersString
getGroupIfType()
getGroupIfTypeString
getGroupName()
getGroupNameString
getInstance()
getInstanceString
getName()
getNameString
getOid()
getOidResourceType
getResourceType()
getResourceTypeint
hashCode()
hashCodeboolean
matches(SnmpObjId base, SnmpInstId inst)
matchesabstract void
storeAttribute(CollectionAttribute attribute, Persister persister)
storeAttributevoid
storeResult(SnmpCollectionSet collectionSet, SNMPCollectorEntry entry, SnmpResult res)
storeResultString
toString()
toString-
Methods inherited from class org.opennms.netmgt.collection.support.AbstractCollectionAttributeType
getGroupType
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.collection.api.CollectionAttributeType
getType
-
-
-
-
Field Detail
-
m_mibObj
protected final MibObject m_mibObj
-
-
Constructor Detail
-
SnmpAttributeType
protected SnmpAttributeType(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
Constructor for SnmpAttributeType.
- Parameters:
resourceType
- aResourceType
object.collectionName
- aString
object.mibObj
- aMibObject
object.groupType
- aAttributeGroupType
object.
-
-
Method Detail
-
getCollectionTrackers
public static List<Collectable> getCollectionTrackers(Collection<SnmpAttributeType> objList)
getCollectionTrackers
- Parameters:
objList
- aCollection
object.- Returns:
- a
List
object.
-
create
public static SnmpAttributeType create(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
create
- Parameters:
resourceType
- aResourceType
object.collectionName
- aString
object.mibObj
- aMibObject
object.groupType
- aAttributeGroupType
object.- Returns:
- a
SnmpAttributeType
object.
-
getResourceType
public ResourceType getResourceType()
getResourceType
- Returns:
- a
ResourceType
object.
-
storeAttribute
public abstract void storeAttribute(CollectionAttribute attribute, Persister persister)
storeAttribute
- Parameters:
attribute
- aCollectionAttribute
object.persister
- aPersister
object.
-
storeResult
public void storeResult(SnmpCollectionSet collectionSet, SNMPCollectorEntry entry, SnmpResult res)
storeResult
- Parameters:
collectionSet
- aSnmpCollectionSet
object.entry
- aSNMPCollectorEntry
object.res
- aSnmpResult
object.
-
toString
public String toString()
toString
-
equals
public boolean equals(Object obj)
equals
- Specified by:
equals
in interfaceCollectionAttributeType
- Overrides:
equals
in classObject
- Parameters:
obj
- aObject
object.- Returns:
- a boolean.
-
hashCode
public int hashCode()
hashCode
- Specified by:
hashCode
in interfaceCollectionAttributeType
- Overrides:
hashCode
in classObject
- Returns:
- a int.
-
matches
public boolean matches(SnmpObjId base, SnmpInstId inst)
matches
- Parameters:
base
- aSnmpObjId
object.inst
- aSnmpInstId
object.- Returns:
- a boolean.
-
-