|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jdbw.server.AbstractDatabaseServer
public abstract class AbstractDatabaseServer
A common base class for many types of DatabaseServers. This class
provides some helper methods and some default implementations for the
interface methods.
If you want to create a custom DatabaseServer implementation,
you probably want to extend StandardDatabaseServer instead of this
class, as it has helper methods for network parameters and authentication.
StandardDatabaseServer| Constructor Summary | |
|---|---|
AbstractDatabaseServer(JDBCDriverDescriptor driverDescriptor)
|
|
| Method Summary | |
|---|---|
DatabaseConnection |
connect(DataSourceFactory dataSourceFactory)
Created a new DataSource to this server and returns it wrapped in a DatabaseConnection |
protected Properties |
getConnectionProperties()
|
protected JDBCDriverDescriptor |
getDriverDescriptor()
|
protected abstract String |
getJDBCUrl()
|
void |
setConnectionProperty(String key,
String value)
Sets a property to be passed in when creating a database connection. |
void |
testConnection()
Tries to create a new database connection and immediately close it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.googlecode.jdbw.DatabaseServer |
|---|
getServerType |
| Constructor Detail |
|---|
public AbstractDatabaseServer(JDBCDriverDescriptor driverDescriptor)
| Method Detail |
|---|
protected Properties getConnectionProperties()
public void setConnectionProperty(String key,
String value)
DatabaseServer
setConnectionProperty in interface DatabaseServerkey - Name of the JDBC connection propertyvalue - Value for the JDBC connection propertypublic DatabaseConnection connect(DataSourceFactory dataSourceFactory)
DatabaseServer
connect in interface DatabaseServerdataSourceFactory - Factory to use when creating the DataSource
public void testConnection()
throws SQLException
DatabaseServer
testConnection in interface DatabaseServerSQLException - In case there was an error connecting to the database serverprotected abstract String getJDBCUrl()
protected JDBCDriverDescriptor getDriverDescriptor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||