public abstract class AbstractDataSource extends Object implements DataSource
DataSource
implementations, taking care of the padding.
'Padding' in the context of this class means default implementations
for certain methods from the DataSource interface, such as
getLoginTimeout(), setLoginTimeout(int), and so forth.
DriverManagerDataSource| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger
Logger available to subclasses.
|
| Constructor and Description |
|---|
AbstractDataSource() |
| Modifier and Type | Method and Description |
|---|---|
int |
getLoginTimeout()
Returns 0, indicating the default system timeout is to be used.
|
PrintWriter |
getLogWriter()
LogWriter methods are not supported.
|
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int timeout)
Setting a login timeout is not supported.
|
void |
setLogWriter(PrintWriter pw)
LogWriter methods are not supported.
|
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnection, getConnectionprotected final Log logger
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int timeout)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter pw) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic Logger getParentLogger()
getParentLogger in interface CommonDataSource