public class DummyConnectionFactory extends Object implements ConnectionFactory, ConnectionParamsProvider<Alias>
| Constructor and Description |
|---|
DummyConnectionFactory(Connection connection)
Instantiates a new dummy connection factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
askCredentials(Runnable callBack)
Checks if system need to ask credentials and if it is instantiated credentials dialog.
|
Connection |
getConnection(ConnectionParams params)
Gets the connection by ConnectionParams.
|
Connection |
getConnection(String name)
Gets the connection by name.
|
Alias |
getConnectionParams()
Gets the connection parameters.
|
boolean |
isReadyToCommit(Connection con)
Checks if connection is ready to commit.
|
void |
releaseConnection(Connection con)
Releases connection.
|
public DummyConnectionFactory(Connection connection)
connection - the connectionpublic void askCredentials(Runnable callBack)
ConnectionParamsProvideraskCredentials in interface ConnectionParamsProvider<Alias>callBack - the call back methodpublic Connection getConnection(ConnectionParams params) throws Exception
ConnectionFactorygetConnection in interface ConnectionFactoryparams - the ConnectionParamsException - in case of any errorpublic Connection getConnection(String name)
throws Exception
ConnectionFactorygetConnection in interface ConnectionFactoryname - the nameException - in case of any errorpublic Alias getConnectionParams()
ConnectionParamsProvidergetConnectionParams in interface ConnectionParamsProvider<Alias>public boolean isReadyToCommit(Connection con)
ConnectionFactoryisReadyToCommit in interface ConnectionFactorycon - the connectionpublic void releaseConnection(Connection con)
ConnectionFactoryreleaseConnection in interface ConnectionFactorycon - the connectionCopyright © 2010-2020 Toolsverse. All Rights Reserved.