Package org.jdbi.v3.core
Class SingleConnectionFactory
- java.lang.Object
-
- org.jdbi.v3.core.SingleConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
class SingleConnectionFactory extends java.lang.Object implements ConnectionFactory
Connection handler which always provides a single connection. Close operation is ignored.
-
-
Field Summary
Fields Modifier and Type Field Description private java.sql.Connectionconnection
-
Constructor Summary
Constructors Constructor Description SingleConnectionFactory(java.sql.Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseConnection(java.sql.Connection toClose)Closes a connection.java.sql.ConnectionopenConnection()Opens a connection.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.core.ConnectionFactory
getCleanableFor
-
-
-
-
Method Detail
-
openConnection
public java.sql.Connection openConnection()
Description copied from interface:ConnectionFactoryOpens a connection.- Specified by:
openConnectionin interfaceConnectionFactory- Returns:
- A
Connectionobject.
-
closeConnection
public void closeConnection(java.sql.Connection toClose)
Description copied from interface:ConnectionFactoryCloses a connection.- Specified by:
closeConnectionin interfaceConnectionFactory- Parameters:
toClose- AConnectionobject.
-
-