org.opennms.netmgt.collectd
Class DefaultCollectionAgent

java.lang.Object
  extended by org.opennms.netmgt.poller.IPv4NetworkInterface
      extended by org.opennms.netmgt.collectd.DefaultCollectionAgent
All Implemented Interfaces:
Serializable, CollectionAgent, StorageStrategyService, NetworkInterface

public class DefaultCollectionAgent
extends IPv4NetworkInterface
implements CollectionAgent

Represents a remote SNMP agent on a specific IPv4 interface.

Version:
$Id: $
Author:
ranger
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opennms.netmgt.poller.IPv4NetworkInterface
m_address
 
Fields inherited from interface org.opennms.netmgt.poller.NetworkInterface
TYPE_IPV4, TYPE_UNKNOWN
 
Method Summary
static CollectionAgent create(Integer ifaceId, IpInterfaceDao ifaceDao, org.springframework.transaction.PlatformTransactionManager transMgr)
          create
 Object getAddress()
           Returns the address information for the interface.
 SnmpAgentConfig getAgentConfig()
          getAgentConfig
 String getHostAddress()
          getHostAddress
 InetAddress getInetAddress()
          getInetAddress
 int getNodeId()
          getNodeId
 int getSavedIfCount()
          getSavedIfCount
 long getSavedSysUpTime()
          getSavedSysUpTime
 Set<IfInfo> getSnmpInterfaceInfo(IfResourceType type)
          getSnmpInterfaceInfo
 String getSnmpInterfaceLabel(int ifIndex)
          getSnmpInterfaceLabel
 String getSysObjectId()
          getSysObjectId
 void setSavedIfCount(int ifCount)
          setSavedIfCount
 void setSavedSysUpTime(long sysUpTime)
          setSavedSysUpTime
 String toString()
          toString
 void validateAgent()
          validateAgent
 
Methods inherited from class org.opennms.netmgt.poller.IPv4NetworkInterface
getAttribute, getType, log, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opennms.netmgt.poller.NetworkInterface
getAttribute, getType, setAttribute
 

Method Detail

create

public static CollectionAgent create(Integer ifaceId,
                                     IpInterfaceDao ifaceDao,
                                     org.springframework.transaction.PlatformTransactionManager transMgr)

create

Parameters:
ifaceId - a Integer object.
ifaceDao - a IpInterfaceDao object.
transMgr - a PlatformTransactionManager object.
Returns:
a CollectionAgent object.

getAddress

public Object getAddress()

Returns the address information for the interface. If the interface then this should be either an InetAddress or an object for specialized address types.

Specified by:
getAddress in interface NetworkInterface
Overrides:
getAddress in class IPv4NetworkInterface
Returns:
a Object object.

getInetAddress

public InetAddress getInetAddress()

getInetAddress

Specified by:
getInetAddress in interface CollectionAgent
Overrides:
getInetAddress in class IPv4NetworkInterface
Returns:
a InetAddress object.

getHostAddress

public String getHostAddress()

getHostAddress

Specified by:
getHostAddress in interface CollectionAgent
Returns:
a String object.

setSavedIfCount

public void setSavedIfCount(int ifCount)

setSavedIfCount

Specified by:
setSavedIfCount in interface CollectionAgent
Parameters:
ifCount - a int.

getSavedIfCount

public int getSavedIfCount()

getSavedIfCount

Specified by:
getSavedIfCount in interface CollectionAgent
Returns:
a int.

getNodeId

public int getNodeId()

getNodeId

Specified by:
getNodeId in interface CollectionAgent
Returns:
a int.

getSysObjectId

public String getSysObjectId()

getSysObjectId

Specified by:
getSysObjectId in interface CollectionAgent
Returns:
a String object.

validateAgent

public void validateAgent()

validateAgent

Specified by:
validateAgent in interface CollectionAgent

toString

public String toString()

toString

Specified by:
toString in interface CollectionAgent
Overrides:
toString in class Object
Returns:
a String object.

getAgentConfig

public SnmpAgentConfig getAgentConfig()

getAgentConfig

Specified by:
getAgentConfig in interface CollectionAgent
Specified by:
getAgentConfig in interface StorageStrategyService
Returns:
a SnmpAgentConfig object.

getSnmpInterfaceInfo

public Set<IfInfo> getSnmpInterfaceInfo(IfResourceType type)

getSnmpInterfaceInfo

Specified by:
getSnmpInterfaceInfo in interface CollectionAgent
Parameters:
type - a IfResourceType object.
Returns:
a Set object.

getSnmpInterfaceLabel

public String getSnmpInterfaceLabel(int ifIndex)

getSnmpInterfaceLabel

Specified by:
getSnmpInterfaceLabel in interface StorageStrategyService
Parameters:
ifIndex - a int.
Returns:
a String object.

getSavedSysUpTime

public long getSavedSysUpTime()

getSavedSysUpTime

Specified by:
getSavedSysUpTime in interface CollectionAgent
Returns:
a long.

setSavedSysUpTime

public void setSavedSysUpTime(long sysUpTime)

setSavedSysUpTime

Specified by:
setSavedSysUpTime in interface CollectionAgent
Parameters:
sysUpTime - a long.


Copyright © 2011. All Rights Reserved.