org.opennms.netmgt.collectd
Class ResourceType

java.lang.Object
  extended by org.opennms.netmgt.collectd.ResourceType
Direct Known Subclasses:
GenericIndexResourceType, IfAliasResourceType, IfResourceType, NodeResourceType

public abstract class ResourceType
extends Object

Abstract ResourceType class.

Version:
$Id: $
Author:
ranger

Constructor Summary
ResourceType(CollectionAgent agent, OnmsSnmpCollection snmpCollection)
          Constructor for ResourceType.
 
Method Summary
abstract  SnmpCollectionResource findAliasedResource(SnmpInstId inst, String ifAlias)
          findAliasedResource
abstract  SnmpCollectionResource findResource(SnmpInstId inst)
          findResource
 CollectionAgent getAgent()
          getAgent
 Collection<SnmpAttributeType> getAttributeTypes()
          getAttributeTypes
protected  OnmsSnmpCollection getCollection()
          getCollection
 SnmpInstId[] getCollectionInstances()
          This method returns an array of the instances that the attributes of this type should be collected for It is used to restricting data collection to just these instances.
protected  String getCollectionName()
          getCollectionName
abstract  Collection<? extends SnmpCollectionResource> getResources()
          getResources
protected  boolean hasDataToCollect()
          hasDataToCollect
protected abstract  Collection<SnmpAttributeType> loadAttributeTypes()
          loadAttributeTypes
 ThreadCategory log()
          log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceType

public ResourceType(CollectionAgent agent,
                    OnmsSnmpCollection snmpCollection)

Constructor for ResourceType.

Parameters:
agent - a CollectionAgent object.
snmpCollection - a OnmsSnmpCollection object.
Method Detail

getAgent

public CollectionAgent getAgent()

getAgent

Returns:
a CollectionAgent object.

getCollectionName

protected String getCollectionName()

getCollectionName

Returns:
a String object.

getCollection

protected OnmsSnmpCollection getCollection()

getCollection

Returns:
a OnmsSnmpCollection object.

getAttributeTypes

public final Collection<SnmpAttributeType> getAttributeTypes()

getAttributeTypes

Returns:
a Collection object.

loadAttributeTypes

protected abstract Collection<SnmpAttributeType> loadAttributeTypes()

loadAttributeTypes

Returns:
a Collection object.

hasDataToCollect

protected boolean hasDataToCollect()

hasDataToCollect

Returns:
a boolean.

getCollectionInstances

public SnmpInstId[] getCollectionInstances()
This method returns an array of the instances that the attributes of this type should be collected for It is used to restricting data collection to just these instances. It is useful for collecting only the required data when a small amount of data from a large table is being collected.

Returns:
an array of SnmpInstId objects.

findResource

public abstract SnmpCollectionResource findResource(SnmpInstId inst)

findResource

Parameters:
inst - a SnmpInstId object.
Returns:
a SnmpCollectionResource object.

findAliasedResource

public abstract SnmpCollectionResource findAliasedResource(SnmpInstId inst,
                                                           String ifAlias)

findAliasedResource

Parameters:
inst - a SnmpInstId object.
ifAlias - a String object.
Returns:
a SnmpCollectionResource object.

getResources

public abstract Collection<? extends SnmpCollectionResource> getResources()

getResources

Returns:
a Collection object.

log

public ThreadCategory log()

log

Returns:
a ThreadCategory object.


Copyright © 2011. All Rights Reserved.