org.opennms.netmgt.collectd
Class SnmpAttributeType

java.lang.Object
  extended by org.opennms.netmgt.collectd.SnmpAttributeType
All Implemented Interfaces:
AttributeDefinition, CollectionAttributeType
Direct Known Subclasses:
NumericAttributeType, StringAttributeType

public abstract class SnmpAttributeType
extends Object
implements AttributeDefinition, CollectionAttributeType

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 concreate classes that represent specific types of data to be stored such as numeric data ((NumericAttributeType)) or string data ((StringAttributeType)).


Constructor Summary
protected SnmpAttributeType(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
           
 
Method Summary
static SnmpAttributeType create(ResourceType resourceType, String collectionName, MibObject mibObj, AttributeGroupType groupType)
           
 boolean equals(Object obj)
           
 String getAlias()
           
protected  String getCollectionName()
           
static List<Collectable> getCollectionTrackers(Collection<SnmpAttributeType> objList)
           
 String getGroupIfType()
           
 String getGroupName()
           
 AttributeGroupType getGroupType()
           
 String getInstance()
           
 String getName()
           
 String getOid()
           
 ResourceType getResourceType()
           
 String getType()
           
 int hashCode()
           
 Category log()
           
 boolean matches(SnmpObjId base, SnmpInstId inst)
           
abstract  void storeAttribute(CollectionAttribute attribute, Persister persister)
           
 void storeResult(SnmpCollectionSet collectionSet, SNMPCollectorEntry entry, SnmpObjId base, SnmpInstId inst, SnmpValue val)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpAttributeType

protected SnmpAttributeType(ResourceType resourceType,
                            String collectionName,
                            MibObject mibObj,
                            AttributeGroupType groupType)
Method Detail

getCollectionName

protected String getCollectionName()

getCollectionTrackers

public static List<Collectable> getCollectionTrackers(Collection<SnmpAttributeType> objList)

create

public static SnmpAttributeType create(ResourceType resourceType,
                                       String collectionName,
                                       MibObject mibObj,
                                       AttributeGroupType groupType)

getResourceType

public ResourceType getResourceType()

getGroupType

public AttributeGroupType getGroupType()
Specified by:
getGroupType in interface CollectionAttributeType

getGroupName

public String getGroupName()

getAlias

public String getAlias()

getOid

public String getOid()

getInstance

public String getInstance()

getType

public String getType()
Specified by:
getType in interface AttributeDefinition

getName

public String getName()
Specified by:
getName in interface AttributeDefinition

storeAttribute

public abstract void storeAttribute(CollectionAttribute attribute,
                                    Persister persister)
Specified by:
storeAttribute in interface CollectionAttributeType

storeResult

public void storeResult(SnmpCollectionSet collectionSet,
                        SNMPCollectorEntry entry,
                        SnmpObjId base,
                        SnmpInstId inst,
                        SnmpValue val)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface AttributeDefinition
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface AttributeDefinition
Overrides:
hashCode in class Object

log

public Category log()

getGroupIfType

public String getGroupIfType()

matches

public boolean matches(SnmpObjId base,
                       SnmpInstId inst)


Copyright © 2009. All Rights Reserved.