|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.DBTools
public class DBTools
This class is intended to be group some utility classes related with RDBMS and the capsd and monitoring plugins.
| Field Summary | |
|---|---|
static String |
DEFAULT_DATABASE_PASSWORD
Default database password. |
static String |
DEFAULT_DATABASE_USER
Default user to use when connecting to the database. |
static String |
DEFAULT_JDBC_DRIVER
Default Sybase JDBC driver to use. |
static int |
DEFAULT_PORT
Default port to use to check this service. |
static String |
DEFAULT_URL
Default vendor protocol, like jdbc:sybase:Tds: |
static String |
JDBC_HOST
The JDBC hostname. |
static int |
MAX_PORT_VALUE
Maximun port range |
static int |
MIN_PORT_VALUE
Minimal port range |
| Method Summary | |
|---|---|
static String |
constructUrl(String url_,
String hostname_)
Constructs a JDBC url given a set of fragments. |
static DBTools |
getInstance()
Returns a single instance of this class to the caller. |
int |
getNumberOfInstances()
Return how many instances of this objects are loaded now |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JDBC_HOST
constructUrl(java.lang.String, java.lang.String),
Constant Field Valuespublic static int MIN_PORT_VALUE
public static int MAX_PORT_VALUE
public static final String DEFAULT_JDBC_DRIVER
public static final String DEFAULT_DATABASE_USER
public static final int DEFAULT_PORT
MIN_PORT_VALUE,
MAX_PORT_VALUE,
Constant Field Valuespublic static final String DEFAULT_DATABASE_PASSWORD
public static final String DEFAULT_URL
| Method Detail |
|---|
public static DBTools getInstance()
public int getNumberOfInstances()
public static String constructUrl(String url_,
String hostname_)
throws IllegalArgumentException,
NullPointerException
jdbc:hostname:4100
hostname_ - The hostname where the database server isurl_ - (for example jdbc:sybase:Tds:@{link #JDBC_HOST
JDBC_HOST}:4100/tempdb). The JDBC_HOST is replaced by the real
hostname
NullPointerException - If one of the arguments is null
IllegalArgumentException - If the JDBC_HOST is not part of the JDBC url
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||