Package org.opennms.netmgt.collectd
Class NodeInfo
- java.lang.Object
-
- org.opennms.netmgt.collectd.SnmpCollectionResource
-
- org.opennms.netmgt.collectd.NodeInfo
-
- All Implemented Interfaces:
CollectionResource
,CollectionVisitable
,Persistable
,ResourceIdentifier
public final class NodeInfo extends SnmpCollectionResource
This class encapsulates all of the node-level data required by the SNMP data collector in order to successfully perform data collection for a scheduled primary SNMP interface.- Author:
- Mike Davidson , OpenNMS
-
-
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 NodeInfo(NodeResourceType def, CollectionAgent agent)
Constructor for NodeInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SNMPCollectorEntry
getEntry()
getEntryjava.lang.String
getInstance()
getInstancejava.lang.String
getInterfaceLabel()
getLabelint
getNodeId()
ResourcePath
getParent()
Returns the name of the parent resource.ResourcePath
getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.java.lang.String
getResourceTypeName()
getResourceTypeNameint
getSnmpIfType()
getTypejava.lang.String
getUnmodifiedInstance()
getUnmodifiedInstancevoid
setEntry(SNMPCollectorEntry nodeEntry)
setEntryboolean
shouldPersist(ServiceParameters params)
Determines whether the attribute should be persisted.java.lang.String
toString()
toString-
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getGroups, getGroupType, getOwnerName, getResourceType, getStringAttributes, getTimeKeeper, rescanNeeded, setAttributeValue, visit
-
-
-
-
Constructor Detail
-
NodeInfo
public NodeInfo(NodeResourceType def, CollectionAgent agent)
Constructor for NodeInfo.
- Parameters:
def
- aNodeResourceType
object.agent
- aCollectionAgent
object.
-
-
Method Detail
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfType
in classSnmpCollectionResource
- Returns:
- a int.
-
getPath
public ResourcePath getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.- Returns:
ResourcePath
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
setEntry
public void setEntry(SNMPCollectorEntry nodeEntry)
setEntry
- Parameters:
nodeEntry
- aSNMPCollectorEntry
object.
-
getEntry
protected SNMPCollectorEntry getEntry()
getEntry
- Returns:
- a
SNMPCollectorEntry
object.
-
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 java.lang.String getResourceTypeName()
getResourceTypeName
- Returns:
- a
String
object.
-
getInstance
public java.lang.String getInstance()
getInstance
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public java.lang.String getUnmodifiedInstance()
getUnmodifiedInstance
- Returns:
- a
String
object.
-
getInterfaceLabel
public java.lang.String getInterfaceLabel()
getLabel
- Returns:
- a
String
object.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResource
Returns the name of the parent resource.- Returns:
- a
String
object.
-
getNodeId
public int getNodeId()
-
-