public interface IJdbcConnectionProvider
Clients of IJdbcConnectionProvider simply call
getConnection(String, String, String, String, String, String...) in order
to get a valid driver URL constructed and passed to DriverManager.
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection(String host,
String port,
String dbName,
String dbLogin,
String dbPassword,
String... addOnArgs)
Provide and open the connection for the given arguments.
|
String |
getDriverUrl(String host,
String port,
String dbName,
String dbLogin,
String dbPassword,
String... addOnArgs)
Constructs the driver's URL from the arguments.
|
Connection getConnection(String host, String port, String dbName, String dbLogin, String dbPassword, String... addOnArgs) throws SQLException
host - the host of the databaseport - the port of the database (some DB use names as port information)dbName - name of databasedbLogin - database logindbPassword - database passwordaddOnArgs - additional arguments to be processed by the driverSQLException - when the connection cannot be openedString getDriverUrl(String host, String port, String dbName, String dbLogin, String dbPassword, String... addOnArgs)
null in case of any problems or throw an exception.host - the host of the databaseport - the port of the database (some DB use names as port information)dbName - name of databasedbLogin - database logindbPassword - database passwordaddOnArgs - additional arguments for the driver URLnullCopyright © 2014. All rights reserved.