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 SNMPCollectorEntrygetEntry()getEntryStringgetInstance()getInstanceStringgetInterfaceLabel()getLabelintgetNodeId()ResourcePathgetParent()Returns the name of the parent resource.ResourcePathgetPath()Retrieves path for the resource, relative to the root of the associatedRrdRepository.StringgetResourceTypeName()getResourceTypeNameintgetSnmpIfType()getTypeStringgetUnmodifiedInstance()getUnmodifiedInstancevoidsetEntry(SNMPCollectorEntry nodeEntry)setEntrybooleanshouldPersist(ServiceParameters params)Determines whether the attribute should be persisted.StringtoString()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- aNodeResourceTypeobject.agent- aCollectionAgentobject.
-
-
Method Detail
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfTypein classSnmpCollectionResource- Returns:
- a int.
-
getPath
public ResourcePath getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository.- Returns:
ResourcePathobject.
-
toString
public String toString()
toString
-
setEntry
public void setEntry(SNMPCollectorEntry nodeEntry)
setEntry
- Parameters:
nodeEntry- aSNMPCollectorEntryobject.
-
getEntry
protected SNMPCollectorEntry getEntry()
getEntry
- Returns:
- a
SNMPCollectorEntryobject.
-
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 String getResourceTypeName()
getResourceTypeName
- Returns:
- a
Stringobject.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
getUnmodifiedInstance
- Returns:
- a
Stringobject.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResourceReturns the name of the parent resource.- Returns:
- a
Stringobject.
-
getNodeId
public int getNodeId()
-
-