Package org.n52.iceland.ds
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 Summary
Modifier and TypeMethodDescriptionGet a data source connection.intGet the max connections numbervoidreturnConnection(Object connection) Return the connection to the provider.
-
Method Details
-
getConnection
Get a data source connection.- Returns:
- Connection to the data source
- Throws:
ConnectionProviderException- if no connection could be acquired
-
returnConnection
Return the connection to the provider.- Parameters:
connection- the connection
-
getMaxConnections
int getMaxConnections()Get the max connections number- Returns:
- The max connection number
-