org.opennms.netmgt.collectd
Class IfInfo

java.lang.Object
  extended by org.opennms.netmgt.collectd.SnmpCollectionResource
      extended by org.opennms.netmgt.collectd.IfInfo
All Implemented Interfaces:
CollectionResource, 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 , Mike Davidson , OpenNMS

Constructor Summary
IfInfo(ResourceType def, CollectionAgent agent, SnmpIfData snmpIfData)
          Constructor for IfInfo.
 
Method Summary
 Map<String,String> getAttributesMap()
          getAttributesMap
protected  SNMPCollectorEntry getEntry()
          getEntry
 int getIndex()
          getIndex
 String getInstance()
          getInstance
 String getLabel()
          getLabel
 int getNodeId()
           
 File getResourceDir(RrdRepository repository)
          getResourceDir
 String getResourceTypeName()
          getResourceTypeName
 int getType()
          getType
 boolean isCollectionEnabled()
          isCollectionEnabled
 boolean isScheduledForCollection()
           
 void setEntry(SNMPCollectorEntry ifEntry)
          setEntry
 void setIfAlias(String ifAlias)
          setIfAlias
 boolean shouldPersist(ServiceParameters serviceParameters)
          shouldPersist
 String toString()
          toString
 
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getGroups, getOwnerName, getResourceType, log, rescanNeeded, setAttributeValue, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfInfo

public IfInfo(ResourceType def,
              CollectionAgent agent,
              SnmpIfData snmpIfData)

Constructor for IfInfo.

Parameters:
def - a ResourceType object.
agent - a CollectionAgent object.
snmpIfData - a SnmpIfData object.
Method Detail

getNodeId

public int getNodeId()

getIndex

public int getIndex()

getIndex

Returns:
a int.

getType

public int getType()

getType

Specified by:
getType in interface CollectionResource
Specified by:
getType in class SnmpCollectionResource
Returns:
a int.

getLabel

public String getLabel()

getLabel

Returns:
a String object.

setIfAlias

public void setIfAlias(String ifAlias)

setIfAlias

Parameters:
ifAlias - a String object.

isCollectionEnabled

public boolean isCollectionEnabled()

isCollectionEnabled

Returns:
a boolean.

setEntry

public void setEntry(SNMPCollectorEntry ifEntry)

setEntry

Parameters:
ifEntry - a SNMPCollectorEntry 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()

getResourceDir

public File getResourceDir(RrdRepository repository)

getResourceDir

Specified by:
getResourceDir in interface ResourceIdentifier
Specified by:
getResourceDir in class SnmpCollectionResource
Parameters:
repository - a RrdRepository object.
Returns:
a File object.

toString

public String toString()

toString

Overrides:
toString in class Object
Returns:
a String object.

shouldPersist

public boolean shouldPersist(ServiceParameters serviceParameters)

shouldPersist

Specified by:
shouldPersist in interface CollectionResource
Specified by:
shouldPersist in class SnmpCollectionResource
Parameters:
serviceParameters - a ServiceParameters object.
Returns:
a boolean.

getResourceTypeName

public String getResourceTypeName()

getResourceTypeName

Returns:
a String object.

getInstance

public String getInstance()

getInstance

Returns:
a String object.


Copyright © 2011. All Rights Reserved.