Interface ConnectionProvider

All Known Subinterfaces:
DataConnectionProvider, UpdateableConnectionProvider

public interface ConnectionProvider
Interface for a connection provider that handles the connection to the underlying data source (e.g. database, web service). Implementation can contain a ConnectionPool.
Since:
1.0.0
  • Method Details

    • getConnection

      Object getConnection() throws ConnectionProviderException
      Get a data source connection.
      Returns:
      Connection to the data source
      Throws:
      ConnectionProviderException - if no connection could be acquired
    • returnConnection

      void returnConnection(Object connection)
      Return the connection to the provider.
      Parameters:
      connection - the connection
    • getMaxConnections

      int getMaxConnections()
      Get the max connections number
      Returns:
      The max connection number