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 SNMPCollectorEntry
getEntry()
getEntryint
getIndex()
getIndexString
getInstance()
getInstanceString
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
.String
getResourceTypeName()
getResourceTypeNameint
getSnmpIfType()
getTypeString
getUnmodifiedInstance()
getUnmodifiedInstanceboolean
isCollectionEnabled()
isCollectionEnabledboolean
isScheduledForCollection()
void
setEntry(SNMPCollectorEntry ifEntry)
setEntryvoid
setIfAlias(String ifAlias)
setIfAliasboolean
shouldPersist(ServiceParameters serviceParameters)
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
-
IfInfo
public IfInfo(ResourceType def, CollectionAgent agent, SnmpIfData snmpIfData)
Constructor for IfInfo.
- Parameters:
def
- aResourceType
object.agent
- aCollectionAgent
object.snmpIfData
- aSnmpIfData
object.
-
-
Method Detail
-
getNodeId
public int getNodeId()
-
getIndex
public int getIndex()
getIndex
- Returns:
- a int.
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfType
in classSnmpCollectionResource
- Returns:
- a int.
-
setIfAlias
public void setIfAlias(String ifAlias)
setIfAlias
- Parameters:
ifAlias
- aString
object.
-
isCollectionEnabled
public boolean isCollectionEnabled()
isCollectionEnabled
- Returns:
- a boolean.
-
setEntry
public void setEntry(SNMPCollectorEntry ifEntry)
setEntry
- Parameters:
ifEntry
- aSNMPCollectorEntry
object.
-
getEntry
protected SNMPCollectorEntry getEntry()
getEntry
- Returns:
- a
SNMPCollectorEntry
object.
-
getAttributesMap
public Map<String,String> getAttributesMap()
getAttributesMap
- Returns:
- a
Map
object.
-
isScheduledForCollection
public boolean isScheduledForCollection()
-
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
-
shouldPersist
public boolean shouldPersist(ServiceParameters serviceParameters)
Determines whether the attribute should be persisted.- Specified by:
shouldPersist
in interfacePersistable
- Specified by:
shouldPersist
in classSnmpCollectionResource
- Parameters:
serviceParameters
- aServiceParameters
object.- Returns:
- a boolean.
-
getResourceTypeName
public String getResourceTypeName()
getResourceTypeName
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
getUnmodifiedInstance
- Returns:
- a
String
object.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResource
Returns the name of the parent resource.- Returns:
- a
String
object.
-
-