Package org.opennms.netmgt.collectd
Class ResourceType
- java.lang.Object
-
- org.opennms.netmgt.collectd.ResourceType
-
- Direct Known Subclasses:
GenericIndexResourceType
,IfAliasResourceType
,IfResourceType
,NodeResourceType
public abstract class ResourceType extends java.lang.Object
Abstract ResourceType class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description ResourceType(SnmpCollectionAgent agent, OnmsSnmpCollection snmpCollection)
Constructor for ResourceType.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract SnmpCollectionResource
findAliasedResource(SnmpInstId inst, java.lang.String ifAlias)
findAliasedResourceabstract SnmpCollectionResource
findResource(SnmpInstId inst)
findResourceSnmpCollectionAgent
getAgent()
getAgentjava.util.Collection<SnmpAttributeType>
getAttributeTypes()
getAttributeTypesprotected OnmsSnmpCollection
getCollection()
getCollectionSnmpInstId[]
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 java.lang.String
getCollectionName()
getCollectionNameabstract java.util.Collection<? extends SnmpCollectionResource>
getResources()
getResourcesprotected boolean
hasDataToCollect()
hasDataToCollectprotected abstract java.util.Collection<SnmpAttributeType>
loadAttributeTypes()
loadAttributeTypes
-
-
-
Constructor Detail
-
ResourceType
public ResourceType(SnmpCollectionAgent agent, OnmsSnmpCollection snmpCollection)
Constructor for ResourceType.
- Parameters:
agent
- aCollectionAgent
object.snmpCollection
- aOnmsSnmpCollection
object.
-
-
Method Detail
-
getAgent
public SnmpCollectionAgent getAgent()
getAgent
- Returns:
- a
CollectionAgent
object.
-
getCollectionName
protected java.lang.String getCollectionName()
getCollectionName
- Returns:
- a
String
object.
-
getCollection
protected OnmsSnmpCollection getCollection()
getCollection
- Returns:
- a
OnmsSnmpCollection
object.
-
getAttributeTypes
public final java.util.Collection<SnmpAttributeType> getAttributeTypes()
getAttributeTypes
- Returns:
- a
Collection
object.
-
loadAttributeTypes
protected abstract java.util.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
- aSnmpInstId
object.- Returns:
- a
SnmpCollectionResource
object.
-
findAliasedResource
public abstract SnmpCollectionResource findAliasedResource(SnmpInstId inst, java.lang.String ifAlias)
findAliasedResource
- Parameters:
inst
- aSnmpInstId
object.ifAlias
- aString
object.- Returns:
- a
SnmpCollectionResource
object.
-
getResources
public abstract java.util.Collection<? extends SnmpCollectionResource> getResources()
getResources
- Returns:
- a
Collection
object.
-
-