public abstract class AbstractDataSource extends Object implements CommonDataSource
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataSource()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected PGDirectConnection |
createConnection(String username,
String password)
Create a connection
|
protected abstract Reference |
createReference()
Create a reference using the correct ObjectFactory instance
|
String |
getClientEncoding() |
abstract String |
getDescription() |
String |
getHost() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
int |
getPort() |
Reference |
getReference() |
String |
getUrl() |
void |
init(Reference reference)
Init
|
void |
setClientEncoding(String v) |
void |
setHost(String v) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setPort(int v) |
void |
setUrl(String v) |
protected Settings settings
protected PGDirectConnection createConnection(String username, String password) throws SQLException
username
- The user namepassword
- The passwordSQLException
- Thrown in case of an errorprotected abstract Reference createReference()
public Reference getReference()
public void init(Reference reference)
reference
- The referencepublic abstract String getDescription()
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
public String getUrl()
public void setUrl(String v)
public String getHost()
public void setHost(String v)
public int getPort()
public void setPort(int v)
public String getClientEncoding()
public void setClientEncoding(String v)