KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > snaq > util > ObjectPoolListener


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

5 package snaq.util;
6
7 import java.util.EventListener JavaDoc;
8
9 /**
10  * Listener interface for ObjectPoolEvent 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 ObjectPoolListener extends EventListener JavaDoc
16 {
17     /**
18      * Called when an item is checked out of the pool.
19      */

20     public void poolCheckOut(ObjectPoolEvent evt);
21     /**
22      * Called when an item is checked back in to the pool.
23      */

24     public void poolCheckIn(ObjectPoolEvent evt);
25     /**
26      * Called when a check-out request causes the poolSize limit to be reached.
27      */

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

32     public void maxPoolLimitExceeded(ObjectPoolEvent evt);
33     /**
34      * Called when a check-out request causes the maxSize limit to be reached.
35      */

36     public void maxSizeLimitReached(ObjectPoolEvent evt);
37     /**
38      * Called when a check-out request attempts to exceed the maxSize limit.
39      */

40     public void maxSizeLimitError(ObjectPoolEvent evt);
41     /**
42      * Called when the pool's parameters are changed.
43      */

44     public void poolParametersChanged(ObjectPoolEvent evt);
45     /**
46      * Called when the pool is released (no more events are fired by the pool after this event).
47      */

48     public void poolReleased(ObjectPoolEvent evt);
49 }
Popular Tags