Class ManagedConnectionTest.MyDataSource
- java.lang.Object
-
- net.shibboleth.idp.attribute.resolver.spring.dc.ManagedConnectionTest.MyDataSource
-
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
- Enclosing class:
- ManagedConnectionTest
private final class ManagedConnectionTest.MyDataSource extends Object implements DataSource
Hard wiring for JNDI. This is aDataSource. Its only job is to return hold the environment so we can test it later
-
-
Field Summary
Fields Modifier and Type Field Description private Hashtable<?,?>environment
-
Constructor Summary
Constructors Constructor Description MyDataSource(Hashtable<?,?> env)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()ConnectiongetConnection(String username, String password)Hashtable<?,?>getEnvironment()intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()booleanisWrapperFor(Class<?> arg0)voidsetLoginTimeout(int seconds)voidsetLogWriter(PrintWriter out)<T> Tunwrap(Class<T> arg0)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Field Detail
-
environment
private final Hashtable<?,?> environment
-
-
Constructor Detail
-
MyDataSource
public MyDataSource(Hashtable<?,?> env)
Constructor.- Parameters:
env- ...
-
-
Method Detail
-
getEnvironment
public Hashtable<?,?> getEnvironment()
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout() throws SQLException- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> arg0) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> arg0) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
getConnection
public Connection getConnection() throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
public Connection getConnection(String username, String password) throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
-