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)
ConnectionParamsProvider
askCredentials
in interface ConnectionParamsProvider<Alias>
callBack
- the call back methodpublic Connection getConnection(ConnectionParams params) throws Exception
ConnectionFactory
getConnection
in interface ConnectionFactory
params
- the ConnectionParamsException
- in case of any errorpublic Connection getConnection(String name) throws Exception
ConnectionFactory
getConnection
in interface ConnectionFactory
name
- the nameException
- in case of any errorpublic Alias getConnectionParams()
ConnectionParamsProvider
getConnectionParams
in interface ConnectionParamsProvider<Alias>
public boolean isReadyToCommit(Connection con)
ConnectionFactory
isReadyToCommit
in interface ConnectionFactory
con
- the connectionpublic void releaseConnection(Connection con)
ConnectionFactory
releaseConnection
in interface ConnectionFactory
con
- the connectionCopyright © 2010-2020 Toolsverse. All Rights Reserved.