org.opennms.netmgt.linkd
Class HibernateEventWriter

java.lang.Object
  extended by org.opennms.netmgt.linkd.AbstractQueryManager
      extended by org.opennms.netmgt.linkd.HibernateEventWriter
All Implemented Interfaces:
QueryManager, org.springframework.beans.factory.InitializingBean

public class HibernateEventWriter
extends AbstractQueryManager
implements org.springframework.beans.factory.InitializingBean


Field Summary
 
Fields inherited from class org.opennms.netmgt.linkd.AbstractQueryManager
m_linkd
 
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
HibernateEventWriter()
           
 
Method Summary
 void afterPropertiesSet()
           
 AtInterfaceDao getAtInterfaceDao()
           
 DataLinkInterfaceDao getDataLinkInterfaceDao()
           
protected  int getIfIndexByName(Connection dbConn, int targetCdpNodeId, String cdpTargetDevicePort)
           
 IpInterfaceDao getIpInterfaceDao()
           
 IpRouteInterfaceDao getIpRouteInterfaceDao()
           
 NodeDao getNodeDao()
           
protected  RouterInterface getNodeFromIp(Connection dbConn, InetAddress nexthop)
           
protected  int getNodeidFromIp(Connection dbConn, InetAddress cdpTargetIpAddr)
           
protected  RouterInterface getNodeidMaskFromIp(Connection dbConn, InetAddress nexthop)
           
protected  List<String> getPhysAddrs(int nodeId, DBUtils d, Connection dbConn)
           
protected  int getSnmpIfType(Connection dbConn, int nodeId, Integer ifIndex)
           
 SnmpInterfaceDao getSnmpInterfaceDao()
           
 LinkableNode getSnmpNode(int nodeid)
          getSnmpNode
 List<LinkableNode> getSnmpNodeList()
          getSnmpNodeList
 StpInterfaceDao getStpInterfaceDao()
           
 StpNodeDao getStpNodeDao()
           
 VlanDao getVlanDao()
           
protected  void markOldDataInactive(Connection dbConn, Timestamp scanTime, int nodeid)
           
protected  void saveIpRouteInterface(Connection dbConn, OnmsIpRouteInterface saveMe)
           
protected  void saveStpInterface(Connection dbConn, OnmsStpInterface saveMe)
           
protected  void saveStpNode(Connection dbConn, OnmsStpNode saveMe)
           
protected  void saveVlan(Connection dbConn, OnmsVlan saveMe)
           
 void setAtInterfaceDao(AtInterfaceDao atInterfaceDao)
           
 void setDataLinkInterfaceDao(DataLinkInterfaceDao dataLinkInterfaceDao)
           
 void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
           
 void setIpRouteInterfaceDao(IpRouteInterfaceDao ipRouteInterfaceDao)
           
 void setNodeDao(NodeDao nodeDao)
           
 void setSnmpInterfaceDao(SnmpInterfaceDao snmpInterfaceDao)
           
 void setStpInterfaceDao(StpInterfaceDao stpInterfaceDao)
           
 void setStpNodeDao(StpNodeDao stpNodeDao)
           
 void setVlanDao(VlanDao vlanDao)
           
 void storeDiscoveryLink(DiscoveryLink discoveryLink)
          storeDiscoveryLink
 LinkableNode storeSnmpCollection(LinkableNode node, SnmpCollection snmpColl)
          storeSnmpCollection
 void update(int nodeid, char action)
          update
 void updateDeletedNodes()
          updateDeletedNodes
 void updateForInterface(int nodeid, String ipAddr, int ifIndex, char action)
          updateForInterface
 
Methods inherited from class org.opennms.netmgt.linkd.AbstractQueryManager
getLinkd, getNode, processCdpCacheTable, processDot1DBase, processDot1DBasePortTable, processDot1DTpFdbTable, processDot1StpPortTable, processIpNetToMediaTable, processQBridgeDot1dTpFdbTable, processRouteTable, processStpNode, processVlanTable, sendNewSuspectEvent, setLinkd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateEventWriter

public HibernateEventWriter()
Method Detail

getSnmpNodeList

public List<LinkableNode> getSnmpNodeList()
                                   throws SQLException
Description copied from interface: QueryManager

getSnmpNodeList

Specified by:
getSnmpNodeList in interface QueryManager
Returns:
a List object.
Throws:
SQLException - if any.

getSnmpNode

public LinkableNode getSnmpNode(int nodeid)
                         throws SQLException
Description copied from interface: QueryManager

getSnmpNode

Specified by:
getSnmpNode in interface QueryManager
Parameters:
nodeid - a int.
Returns:
a LinkableNode object.
Throws:
SQLException - if any.

updateDeletedNodes

public void updateDeletedNodes()
                        throws SQLException
Description copied from interface: QueryManager

updateDeletedNodes

Specified by:
updateDeletedNodes in interface QueryManager
Throws:
SQLException - if any.

markOldDataInactive

protected void markOldDataInactive(Connection dbConn,
                                   Timestamp scanTime,
                                   int nodeid)
                            throws SQLException
Specified by:
markOldDataInactive in class AbstractQueryManager
Throws:
SQLException

storeSnmpCollection

public LinkableNode storeSnmpCollection(LinkableNode node,
                                        SnmpCollection snmpColl)
                                 throws SQLException
Description copied from interface: QueryManager

storeSnmpCollection

Specified by:
storeSnmpCollection in interface QueryManager
Parameters:
node - a LinkableNode object.
snmpColl - a SnmpCollection object.
Returns:
a LinkableNode object.
Throws:
SQLException - if any.

storeDiscoveryLink

public void storeDiscoveryLink(DiscoveryLink discoveryLink)
                        throws SQLException
Description copied from interface: QueryManager

storeDiscoveryLink

Specified by:
storeDiscoveryLink in interface QueryManager
Parameters:
discoveryLink - a DiscoveryLink object.
Throws:
SQLException - if any.

update

public void update(int nodeid,
                   char action)
            throws SQLException
Description copied from interface: QueryManager

update

Specified by:
update in interface QueryManager
Parameters:
nodeid - a int.
action - a char.
Throws:
SQLException - if any.

updateForInterface

public void updateForInterface(int nodeid,
                               String ipAddr,
                               int ifIndex,
                               char action)
                        throws SQLException
Description copied from interface: QueryManager

updateForInterface

Specified by:
updateForInterface in interface QueryManager
Parameters:
nodeid - a int.
ipAddr - a String object.
ifIndex - a int.
action - a char.
Throws:
SQLException - if any.

getIfIndexByName

protected int getIfIndexByName(Connection dbConn,
                               int targetCdpNodeId,
                               String cdpTargetDevicePort)
                        throws SQLException
Specified by:
getIfIndexByName in class AbstractQueryManager
Throws:
SQLException

getNodeidFromIp

protected int getNodeidFromIp(Connection dbConn,
                              InetAddress cdpTargetIpAddr)
                       throws SQLException
Specified by:
getNodeidFromIp in class AbstractQueryManager
Throws:
SQLException

getNodeidMaskFromIp

protected RouterInterface getNodeidMaskFromIp(Connection dbConn,
                                              InetAddress nexthop)
                                       throws SQLException
Specified by:
getNodeidMaskFromIp in class AbstractQueryManager
Throws:
SQLException

getNodeFromIp

protected RouterInterface getNodeFromIp(Connection dbConn,
                                        InetAddress nexthop)
                                 throws SQLException
Specified by:
getNodeFromIp in class AbstractQueryManager
Throws:
SQLException

getSnmpIfType

protected int getSnmpIfType(Connection dbConn,
                            int nodeId,
                            Integer ifIndex)
                     throws SQLException
Specified by:
getSnmpIfType in class AbstractQueryManager
Throws:
SQLException

getPhysAddrs

protected List<String> getPhysAddrs(int nodeId,
                                    DBUtils d,
                                    Connection dbConn)
                             throws SQLException
Specified by:
getPhysAddrs in class AbstractQueryManager
Throws:
SQLException

saveIpRouteInterface

protected void saveIpRouteInterface(Connection dbConn,
                                    OnmsIpRouteInterface saveMe)
                             throws SQLException
Specified by:
saveIpRouteInterface in class AbstractQueryManager
Throws:
SQLException

saveVlan

protected void saveVlan(Connection dbConn,
                        OnmsVlan saveMe)
                 throws SQLException
Specified by:
saveVlan in class AbstractQueryManager
Throws:
SQLException

saveStpNode

protected void saveStpNode(Connection dbConn,
                           OnmsStpNode saveMe)
                    throws SQLException
Specified by:
saveStpNode in class AbstractQueryManager
Throws:
SQLException

saveStpInterface

protected void saveStpInterface(Connection dbConn,
                                OnmsStpInterface saveMe)
                         throws SQLException
Specified by:
saveStpInterface in class AbstractQueryManager
Throws:
SQLException

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

getNodeDao

public NodeDao getNodeDao()
Specified by:
getNodeDao in class AbstractQueryManager

setNodeDao

public void setNodeDao(NodeDao nodeDao)

getIpInterfaceDao

public IpInterfaceDao getIpInterfaceDao()
Specified by:
getIpInterfaceDao in class AbstractQueryManager

setIpInterfaceDao

public void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)

getSnmpInterfaceDao

public SnmpInterfaceDao getSnmpInterfaceDao()

setSnmpInterfaceDao

public void setSnmpInterfaceDao(SnmpInterfaceDao snmpInterfaceDao)

getAtInterfaceDao

public AtInterfaceDao getAtInterfaceDao()
Specified by:
getAtInterfaceDao in class AbstractQueryManager

setAtInterfaceDao

public void setAtInterfaceDao(AtInterfaceDao atInterfaceDao)

getVlanDao

public VlanDao getVlanDao()

setVlanDao

public void setVlanDao(VlanDao vlanDao)

getStpNodeDao

public StpNodeDao getStpNodeDao()

setStpNodeDao

public void setStpNodeDao(StpNodeDao stpNodeDao)

getStpInterfaceDao

public StpInterfaceDao getStpInterfaceDao()

setStpInterfaceDao

public void setStpInterfaceDao(StpInterfaceDao stpInterfaceDao)

getIpRouteInterfaceDao

public IpRouteInterfaceDao getIpRouteInterfaceDao()

setIpRouteInterfaceDao

public void setIpRouteInterfaceDao(IpRouteInterfaceDao ipRouteInterfaceDao)

getDataLinkInterfaceDao

public DataLinkInterfaceDao getDataLinkInterfaceDao()

setDataLinkInterfaceDao

public void setDataLinkInterfaceDao(DataLinkInterfaceDao dataLinkInterfaceDao)


Copyright © 2011. All Rights Reserved.