Package org.opennms.netmgt.collectd
Class GenericIndexResource
- java.lang.Object
-
- org.opennms.netmgt.collectd.SnmpCollectionResource
-
- org.opennms.netmgt.collectd.GenericIndexResource
-
- All Implemented Interfaces:
CollectionResource
,CollectionVisitable
,Persistable
,ResourceIdentifier
public class GenericIndexResource extends SnmpCollectionResource
GenericIndexResource class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.collection.api.CollectionResource
RESOURCE_TYPE_IF, RESOURCE_TYPE_LATENCY, RESOURCE_TYPE_NODE
-
-
Constructor Summary
Constructors Constructor Description GenericIndexResource(ResourceType def, String name, SnmpInstId inst)
Constructor for GenericIndexResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getInstance()
getInstanceString
getInterfaceLabel()
getLabelResourcePath
getParent()
Returns the name of the parent resource.ResourcePath
getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.String
getResourceTypeName()
getResourceTypeNameint
getSnmpIfType()
Returns ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise the SNMP type of the interface.String
getUnmodifiedInstance()
Returns the unmodified instance string thisCollectionResource
represents.boolean
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.String
toString()
toString-
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getGroups, getGroupType, getOwnerName, getResourceType, getStringAttributes, getTimeKeeper, rescanNeeded, setAttributeValue, visit
-
-
-
-
Constructor Detail
-
GenericIndexResource
public GenericIndexResource(ResourceType def, String name, SnmpInstId inst)
Constructor for GenericIndexResource.
- Parameters:
def
- aResourceType
object.name
- aString
object.inst
- aSnmpInstId
object.
-
-
Method Detail
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifier
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.- Returns:
ResourcePath
object.
-
toString
public String toString()
toString
-
getSnmpIfType
public int getSnmpIfType()
Returns ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise the SNMP type of the interface. This field is used to match the ifType field of the group from datacollection-config.xml.- Specified by:
getSnmpIfType
in classSnmpCollectionResource
- Returns:
- a int.
-
shouldPersist
public boolean shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.- Specified by:
shouldPersist
in interfacePersistable
- Specified by:
shouldPersist
in classSnmpCollectionResource
- Parameters:
params
- aServiceParameters
object.- Returns:
- a boolean.
-
getResourceTypeName
public String getResourceTypeName()
getResourceTypeName
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
Description copied from interface:CollectionResource
Returns the unmodified instance string thisCollectionResource
represents.- Returns:
- a
String
object.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResource
Returns the name of the parent resource.- Returns:
- a
String
object.
-
-