public class ProxyDataSource extends Object implements DataSource, Closeable
DataSource with QueryExecutionListener.| Constructor and Description |
|---|
ProxyDataSource() |
ProxyDataSource(DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(QueryExecutionListener listener) |
void |
close() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
ConnectionIdManager |
getConnectionIdManager() |
String |
getDataSourceName() |
InterceptorHolder |
getInterceptorHolder() |
JdbcProxyFactory |
getJdbcProxyFactory() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setConnectionIdManager(ConnectionIdManager connectionIdManager) |
void |
setDataSource(DataSource dataSource) |
void |
setDataSourceName(String dataSourceName) |
void |
setInterceptorHolder(InterceptorHolder interceptorHolder) |
void |
setJdbcProxyFactory(JdbcProxyFactory jdbcProxyFactory) |
void |
setListener(QueryExecutionListener listener)
Deprecated.
|
void |
setLoginTimeout(int i) |
void |
setLogWriter(PrintWriter printWriter) |
<T> T |
unwrap(Class<T> tClass) |
public ProxyDataSource()
public ProxyDataSource(DataSource dataSource)
public void setDataSource(DataSource dataSource)
public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic void setLogWriter(PrintWriter printWriter) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int i)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> tClass) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic void setListener(QueryExecutionListener listener)
QueryExecutionListener with default(NoOp) QueryTransformer.listener - a listerpublic void addListener(QueryExecutionListener listener)
public void setDataSourceName(String dataSourceName)
public String getDataSourceName()
@IgnoreJRERequirement public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic JdbcProxyFactory getJdbcProxyFactory()
public void setJdbcProxyFactory(JdbcProxyFactory jdbcProxyFactory)
public InterceptorHolder getInterceptorHolder()
public void setInterceptorHolder(InterceptorHolder interceptorHolder)
public ConnectionIdManager getConnectionIdManager()
public void setConnectionIdManager(ConnectionIdManager connectionIdManager)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017. All rights reserved.