org.opennms.netmgt.collectd
Class AttributeType

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

public abstract class AttributeType
extends Object
implements AttributeDefinition

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

Constructor Detail

AttributeType

protected AttributeType(ResourceType resourceType,
                        String collectionName,
                        org.opennms.netmgt.config.MibObject mibObj,
                        AttributeGroupType groupType)
Method Detail

getCollectionName

protected String getCollectionName()

getCollectionTrackers

public static List<org.opennms.netmgt.snmp.Collectable> getCollectionTrackers(Collection<AttributeType> objList)

create

public static AttributeType create(ResourceType resourceType,
                                   String collectionName,
                                   org.opennms.netmgt.config.MibObject mibObj,
                                   AttributeGroupType groupType)

getResourceType

public ResourceType getResourceType()

getGroupType

public AttributeGroupType getGroupType()

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

protected abstract void storeAttribute(Attribute attribute,
                                       Persister persister)

storeResult

public void storeResult(CollectionSet collectionSet,
                        SNMPCollectorEntry entry,
                        org.opennms.netmgt.snmp.SnmpObjId base,
                        org.opennms.netmgt.snmp.SnmpInstId inst,
                        org.opennms.netmgt.snmp.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(org.opennms.netmgt.snmp.SnmpObjId base,
                       org.opennms.netmgt.snmp.SnmpInstId inst)


Copyright ? 2007. All Rights Reserved.