org.opennms.netmgt.linkd
Class DbEventWriter

java.lang.Object
  extended by org.opennms.netmgt.linkd.DbEventWriter
All Implemented Interfaces:
QueryManager

public class DbEventWriter
extends Object
implements QueryManager

This class is used to store informations owned by SnmpCollection and DiscoveryLink Classes in DB. When saving Snmp Collection it populate Bean LinkableNode with information for DiscoveryLink. It performes data test for DiscoveryLink. Also take correct action on DB tables in case node is deleted service SNMP is discovered, service SNMP is Lost and Regained Also this class holds

Author:
antonio

Field Summary
 
Fields inherited from interface org.opennms.netmgt.linkd.QueryManager
ACTION_DELETE, ACTION_UPTODATE, CDP_ADDRESS_TYPE_IP_ADDRESS, SNMP_DOT1D_FDB_STATUS_INVALID, SNMP_DOT1D_FDB_STATUS_LEARNED, SNMP_DOT1D_FDB_STATUS_MGMT, SNMP_DOT1D_FDB_STATUS_OTHER, SNMP_DOT1D_FDB_STATUS_SELF
 
Constructor Summary
DbEventWriter()
           
 
Method Summary
 LinkableNode getSnmpNode(int nodeid)
           
 List<LinkableNode> getSnmpNodeList()
           
 String getSnmpPrimaryIp(int nodeid)
           
 void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
           
 void storeDiscoveryLink(DiscoveryLink discovery)
           
 LinkableNode storeSnmpCollection(LinkableNode node, SnmpCollection snmpcoll)
           
 void update(int nodeid, char status)
           
 void updateDeletedNodes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbEventWriter

public DbEventWriter()
Method Detail

storeDiscoveryLink

public void storeDiscoveryLink(DiscoveryLink discovery)
                        throws SQLException
Specified by:
storeDiscoveryLink in interface QueryManager
Parameters:
discovery -
Throws:
SQLException

storeSnmpCollection

public LinkableNode storeSnmpCollection(LinkableNode node,
                                        SnmpCollection snmpcoll)
                                 throws SQLException
Specified by:
storeSnmpCollection in interface QueryManager
Throws:
SQLException

update

public void update(int nodeid,
                   char status)
            throws SQLException
Specified by:
update in interface QueryManager
Throws:
SQLException

getSnmpNode

public LinkableNode getSnmpNode(int nodeid)
                         throws SQLException
Specified by:
getSnmpNode in interface QueryManager
Throws:
SQLException

getSnmpNodeList

public List<LinkableNode> getSnmpNodeList()
                                   throws SQLException
Specified by:
getSnmpNodeList in interface QueryManager
Throws:
SQLException

updateDeletedNodes

public void updateDeletedNodes()
                        throws SQLException
Specified by:
updateDeletedNodes in interface QueryManager
Throws:
SQLException

getSnmpPrimaryIp

public String getSnmpPrimaryIp(int nodeid)
                        throws SQLException
Specified by:
getSnmpPrimaryIp in interface QueryManager
Throws:
SQLException

setJdbcTemplate

public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Specified by:
setJdbcTemplate in interface QueryManager


Copyright © 2009. All Rights Reserved.