KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > snaq > db > ConnectionPoolListener


1 /*
2     DBPool - JDBC Connection Pool Manager
3     Copyright (c) Giles Winstanley
4 */

5 package snaq.db;
6
7 import snaq.util.ObjectPoolListener;
8
9 /**
10  * Listener for ConnectionPoolEvent objects.
11  * Listeners should ensure the implementations of the listed methods return
12  * quickly. Tasks that require more time should spawn a new thread.
13  * @author Giles Winstanley
14  */

15 public interface ConnectionPoolListener extends ObjectPoolListener
16 {
17     /**
18      * Called when a connection is found to be invalid.
19      */

20     public void validationError(ConnectionPoolEvent evt);
21     /**
22      * Called when a connection is checked out of the pool.
23      */

24     public void poolCheckOut(ConnectionPoolEvent evt);
25     /**
26      * Called when a connection is checked back in to the pool.
27      */

28     public void poolCheckIn(ConnectionPoolEvent evt);
29     /**
30      * Called when a check-out request causes the poolSize limit to be reached.
31      */

32     public void maxPoolLimitReached(ConnectionPoolEvent evt);
33     /**
34      * Called when a check-out request causes the poolSize limit to be exceeded.
35      */

36     public void maxPoolLimitExceeded(ConnectionPoolEvent evt);
37     /**
38      * Called when a check-out request causes the maxSize limit to be reached.
39      * (maxSize is equivalent to maxConn)
40      */

41     public void maxSizeLimitReached(ConnectionPoolEvent evt);
42     /**
43      * Called when a check-out request attempts to exceed the maxSize limit.
44      * (maxSize is equivalent to maxConn)
45      */

46     public void maxSizeLimitError(ConnectionPoolEvent evt);
47     /**
48      * Called when the pool's parameters are changed.
49      */

50     public void poolParametersChanged(ConnectionPoolEvent evt);
51     /**
52      * Called when the pool is released (no more events are fired by the pool after this event).
53      */

54     public void poolReleased(ConnectionPoolEvent evt);
55 }
Popular Tags