Package org.n52.iceland.ds
Interface ConnectionProvider
-
- All Known Subinterfaces:
DataConnectionProvider,UpdateableConnectionProvider
public interface ConnectionProviderInterface 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetConnection()Get a data source connection.intgetMaxConnections()Get the max connections numbervoidreturnConnection(Object connection)Return the connection to the provider.
-
-
-
Method Detail
-
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
-
-