org.opennms.netmgt.poller
Class DefaultQueryManager

java.lang.Object
  extended by org.opennms.netmgt.poller.DefaultQueryManager
All Implemented Interfaces:
QueryManager

public class DefaultQueryManager
extends Object
implements QueryManager

Author:
brozow TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
DefaultQueryManager()
           
 
Method Summary
 boolean activeServiceExists(String whichEvent, int nodeId, String ipAddr, String serviceName)
           
 Timestamp convertEventTimeToTimeStamp(String time)
           
 List getActiveServiceIdsForInterface(String ipaddr)
           
 String[] getCriticalPath(int nodeId)
           
 DataSource getDataSource()
           
 List getInterfacesWithService(String svcName)
           
 int getNodeIDForInterface(String ipaddr)
           
 String getNodeLabel(int nodeId)
           
 int getServiceCountForInterface(String ipaddr)
           
 int getServiceID(String serviceName)
           
 Date getServiceLostDate(int nodeId, String ipAddr, String svcName, int serviceId)
           
 void openOutage(String outageIdSQL, int nodeId, String ipAddr, String svcName, int dbId, String time)
           
 void reparentOutages(String ipAddr, int oldNodeId, int newNodeId)
           
 void resolveOutage(int nodeId, String ipAddr, String svcName, int dbId, String time)
           
 void setDataSource(DataSource dataSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueryManager

public DefaultQueryManager()
Method Detail

setDataSource

public void setDataSource(DataSource dataSource)
Specified by:
setDataSource in interface QueryManager

getDataSource

public DataSource getDataSource()
Specified by:
getDataSource in interface QueryManager

activeServiceExists

public boolean activeServiceExists(String whichEvent,
                                   int nodeId,
                                   String ipAddr,
                                   String serviceName)
Specified by:
activeServiceExists in interface QueryManager
Parameters:
whichEvent -
nodeId -
ipAddr -
serviceName -
Returns:

getActiveServiceIdsForInterface

public List getActiveServiceIdsForInterface(String ipaddr)
                                     throws SQLException
Specified by:
getActiveServiceIdsForInterface in interface QueryManager
Parameters:
ipaddr -
Returns:
Throws:
SQLException

getNodeIDForInterface

public int getNodeIDForInterface(String ipaddr)
                          throws SQLException
Specified by:
getNodeIDForInterface in interface QueryManager
Parameters:
ipaddr -
Returns:
Throws:
SQLException

getNodeLabel

public String getNodeLabel(int nodeId)
                    throws SQLException
Specified by:
getNodeLabel in interface QueryManager
Parameters:
nodeId -
Returns:
Throws:
SQLException

getServiceCountForInterface

public int getServiceCountForInterface(String ipaddr)
                                throws SQLException
Specified by:
getServiceCountForInterface in interface QueryManager
Parameters:
ipaddr -
Returns:
Throws:
SQLException

getInterfacesWithService

public List getInterfacesWithService(String svcName)
                              throws SQLException
Specified by:
getInterfacesWithService in interface QueryManager
Parameters:
svcName -
Returns:
Throws:
SQLException

getServiceLostDate

public Date getServiceLostDate(int nodeId,
                               String ipAddr,
                               String svcName,
                               int serviceId)
Specified by:
getServiceLostDate in interface QueryManager
Parameters:
poller -
nodeId -
ipAddr -
svcName -
Returns:

convertEventTimeToTimeStamp

public Timestamp convertEventTimeToTimeStamp(String time)

openOutage

public void openOutage(String outageIdSQL,
                       int nodeId,
                       String ipAddr,
                       String svcName,
                       int dbId,
                       String time)
Specified by:
openOutage in interface QueryManager
svcName - TODO

resolveOutage

public void resolveOutage(int nodeId,
                          String ipAddr,
                          String svcName,
                          int dbId,
                          String time)
Specified by:
resolveOutage in interface QueryManager
svcName - TODO

reparentOutages

public void reparentOutages(String ipAddr,
                            int oldNodeId,
                            int newNodeId)
Specified by:
reparentOutages in interface QueryManager

getServiceID

public int getServiceID(String serviceName)

getCriticalPath

public String[] getCriticalPath(int nodeId)
Specified by:
getCriticalPath in interface QueryManager


Copyright © 2009. All Rights Reserved.