|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionHandler
This interface describes the behaviour of a Mentawai database connection provider. Classes implementing this interface may or may not use an underlying connection pool. This is a transparent way to get a connection to a database with Mentawai.
| Nested Class Summary | |
|---|---|
static interface |
ConnectionHandler.Exec
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the connection pool, closing and cleaning all connections. |
void |
exec(ConnectionHandler.Exec exec)
|
Connection |
getConnection()
Returns a Connection to the database. |
String |
getStatus()
Print the status of this connection pool if any. |
void |
release(Connection conn)
Release this connection. |
| Methods inherited from interface org.mentacontainer.Factory |
|---|
getInstance, getType |
| Methods inherited from interface org.mentacontainer.Interceptor |
|---|
onCleared, onCreated |
| Method Detail |
|---|
Connection getConnection()
throws SQLException
SQLException - if there were problems trying to acquire the connection.void release(Connection conn)
conn - The connection to release.void destroy()
String getStatus()
void exec(ConnectionHandler.Exec exec)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||