Package org.opennms.netmgt.collectd
Class IfInfo
- java.lang.Object
-
- org.opennms.netmgt.collectd.SnmpCollectionResource
-
- org.opennms.netmgt.collectd.IfInfo
-
- All Implemented Interfaces:
CollectionResource,CollectionVisitable,Persistable,ResourceIdentifier
public final class IfInfo extends SnmpCollectionResource
This class encapsulates all the information required by the SNMP collector in order to perform data collection for an individual interface and store that data in an appropriately named RRD file.- Version:
- $Id: $
- 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 IfInfo(ResourceType def, CollectionAgent agent, SnmpIfData snmpIfData)Constructor for IfInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAttributesMap()getAttributesMapprotected SNMPCollectorEntrygetEntry()getEntryintgetIndex()getIndexStringgetInstance()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()getUnmodifiedInstancebooleanisCollectionEnabled()isCollectionEnabledbooleanisScheduledForCollection()voidsetEntry(SNMPCollectorEntry ifEntry)setEntryvoidsetIfAlias(String ifAlias)setIfAliasbooleanshouldPersist(ServiceParameters serviceParameters)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
-
IfInfo
public IfInfo(ResourceType def, CollectionAgent agent, SnmpIfData snmpIfData)
Constructor for IfInfo.
- Parameters:
def- aResourceTypeobject.agent- aCollectionAgentobject.snmpIfData- aSnmpIfDataobject.
-
-
Method Detail
-
getNodeId
public int getNodeId()
-
getIndex
public int getIndex()
getIndex
- Returns:
- a int.
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfTypein classSnmpCollectionResource- Returns:
- a int.
-
setIfAlias
public void setIfAlias(String ifAlias)
setIfAlias
- Parameters:
ifAlias- aStringobject.
-
isCollectionEnabled
public boolean isCollectionEnabled()
isCollectionEnabled
- Returns:
- a boolean.
-
setEntry
public void setEntry(SNMPCollectorEntry ifEntry)
setEntry
- Parameters:
ifEntry- aSNMPCollectorEntryobject.
-
getEntry
protected SNMPCollectorEntry getEntry()
getEntry
- Returns:
- a
SNMPCollectorEntryobject.
-
getAttributesMap
public Map<String,String> getAttributesMap()
getAttributesMap
- Returns:
- a
Mapobject.
-
isScheduledForCollection
public boolean isScheduledForCollection()
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifierRetrieves path for the resource, relative to the root of the associatedRrdRepository.- Returns:
ResourcePathobject.
-
toString
public String toString()
toString
-
shouldPersist
public boolean shouldPersist(ServiceParameters serviceParameters)
Determines whether the attribute should be persisted.- Specified by:
shouldPersistin interfacePersistable- Specified by:
shouldPersistin classSnmpCollectionResource- Parameters:
serviceParameters- 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.
-
-