public class DBTools extends Object
Modifier and Type | Field and Description |
---|---|
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 int |
MAX_PORT_VALUE
Maximum port range
|
static int |
MIN_PORT_VALUE
Minimal port range
|
static String |
POSTGRESQL_JDBC_DRIVER
PostgreSQL JDBC driver
|
Modifier and Type | Method and Description |
---|---|
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
|
public static final int MIN_PORT_VALUE
public static final int MAX_PORT_VALUE
public static final String DEFAULT_JDBC_DRIVER
public static final String POSTGRESQL_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
public static DBTools getInstance()
public int getNumberOfInstances()
public static String constructUrl(String url_, String hostname_) throws IllegalArgumentException, NullPointerException
jdbc:<protocol>: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
hostnameString
object.NullPointerException
- If one of the arguments is nullIllegalArgumentException
- If the JDBC_HOST is not part of the JDBC urlCopyright © 2017. All rights reserved.