Interface ConnectionFactory

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ConnectionFactory
Supplies Connection instances to a created Handle and allows custom close handling.
  • Method Details

    • openConnection

      Connection openConnection() throws SQLException
      Open a connection.
      Returns:
      a Connection
      Throws:
      SQLException - if anything goes wrong
    • closeConnection

      default void closeConnection(Connection conn) throws SQLException
      Close a connection.
      Parameters:
      conn - the connection to close
      Throws:
      SQLException - if anything goes wrong