|
OpenNMS API 1.2.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.capsd.AbstractPlugin
org.opennms.netmgt.capsd.JDBCPlugin
This OpenNMS capsd plugin checks if a given server is running a server that can talk JDBC on a given interface. If true then the interface is "saved" for future service state checking. This plugin is slow; Establishing a connection between the client and the server is an slow operation. A connection pool doesn't make any sense when discovering a database, Also opening and closing a connection every time helps to discover problems like a RDBMS running out of connections.
More plugin information available at: OpenNMS developer site
Field Summary | |
private static int |
DEFAULT_RETRY
Default number of retries for TCP requests |
private static int |
DEFAULT_TIMEOUT
Default timeout (in milliseconds) for TCP requests |
private static java.lang.String |
PROTOCOL_NAME
The protocol supported by the plugin |
Constructor Summary | |
JDBCPlugin()
Class constructor. |
Method Summary | |
boolean |
checkStatus(org.apache.log4j.Category log,
java.sql.Connection con,
java.util.Map qualifiers)
|
java.lang.String |
getProtocolName()
Returns the default protocol name |
boolean |
isProtocolSupported(java.net.InetAddress address)
Default checking method, asuming all the parameters by default. |
boolean |
isProtocolSupported(java.net.InetAddress address,
java.util.Map qualifiers)
Checking method, receives all the parameters as a Map. |
private boolean |
isServer(java.lang.String hostname,
java.util.Map qualifiers)
Checks if a given server is listening o a given interface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String PROTOCOL_NAME
private static final int DEFAULT_RETRY
private static final int DEFAULT_TIMEOUT
Constructor Detail |
public JDBCPlugin()
Method Detail |
private boolean isServer(java.lang.String hostname, java.util.Map qualifiers)
hostname
- name of the RDBMS serverqualifiers
- Map of parameters.DBTools.constructUrl(java.lang.String, java.lang.String)
public boolean checkStatus(org.apache.log4j.Category log, java.sql.Connection con, java.util.Map qualifiers)
public java.lang.String getProtocolName()
getProtocolName
in interface Plugin
getProtocolName
in class AbstractPlugin
public boolean isProtocolSupported(java.net.InetAddress address)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- Address of the JDBC server to poll
public boolean isProtocolSupported(java.net.InetAddress address, java.util.Map qualifiers)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- Address of the JDBC server to pollqualifiers
- Set of properties to be passed to the JDBC driver.
java.lang.NullPointerException
- if the properties or the address are not defined
|
OpenNMS API 1.2.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |