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, java.lang.String name, SnmpInstId inst)Constructor for GenericIndexResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetInstance()getInstancejava.lang.StringgetInterfaceLabel()getLabelResourcePathgetParent()Returns the name of the parent resource.ResourcePathgetPath()Retrieves path for the resource, relative to the root of the associatedRrdRepository.java.lang.StringgetResourceTypeName()getResourceTypeNameintgetSnmpIfType()Returns ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise the SNMP type of the interface.java.lang.StringgetUnmodifiedInstance()Returns the unmodified instance string thisCollectionResourcerepresents.booleanshouldPersist(ServiceParameters params)Determines whether the attribute should be persisted.java.lang.StringtoString()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, java.lang.String name, SnmpInstId inst)
Constructor for GenericIndexResource.
- Parameters:
def- aResourceTypeobject.name- aStringobject.inst- aSnmpInstIdobject.
-
-
Method Detail
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifierRetrieves path for the resource, relative to the root of the associatedRrdRepository.- Returns:
ResourcePathobject.
-
toString
public java.lang.String toString()
toString
- Overrides:
toStringin classjava.lang.Object- Returns:
- a
Stringobject.
-
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:
getSnmpIfTypein classSnmpCollectionResource- Returns:
- a int.
-
shouldPersist
public boolean shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.- Specified by:
shouldPersistin interfacePersistable- Specified by:
shouldPersistin classSnmpCollectionResource- Parameters:
params- aServiceParametersobject.- Returns:
- a boolean.
-
getResourceTypeName
public java.lang.String getResourceTypeName()
getResourceTypeName
- Returns:
- a
Stringobject.
-
getInstance
public java.lang.String getInstance()
getInstance
- Returns:
- a
Stringobject.
-
getUnmodifiedInstance
public java.lang.String getUnmodifiedInstance()
Description copied from interface:CollectionResourceReturns the unmodified instance string thisCollectionResourcerepresents.- Returns:
- a
Stringobject.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResourceReturns the name of the parent resource.- Returns:
- a
Stringobject.
-
getInterfaceLabel
public java.lang.String getInterfaceLabel()
getLabel
- Returns:
- a
Stringobject.
-
-