01: /*
02: DBPool - JDBC Connection Pool Manager
03: Copyright (c) Giles Winstanley
04: */
05: package snaq.util;
06:
07: import java.util.EventListener;
08:
09: /**
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 {
16: /**
17: * Called when an item is checked out of the pool.
18: */
19: public void poolCheckOut(ObjectPoolEvent evt);
20:
21: /**
22: * Called when an item is checked back in to the pool.
23: */
24: public void poolCheckIn(ObjectPoolEvent evt);
25:
26: /**
27: * Called when a check-out request causes the poolSize limit to be reached.
28: */
29: public void maxPoolLimitReached(ObjectPoolEvent evt);
30:
31: /**
32: * Called when a check-out request causes the poolSize limit to be exceeded.
33: */
34: public void maxPoolLimitExceeded(ObjectPoolEvent evt);
35:
36: /**
37: * Called when a check-out request causes the maxSize limit to be reached.
38: */
39: public void maxSizeLimitReached(ObjectPoolEvent evt);
40:
41: /**
42: * Called when a check-out request attempts to exceed the maxSize limit.
43: */
44: public void maxSizeLimitError(ObjectPoolEvent evt);
45:
46: /**
47: * Called when the pool's parameters are changed.
48: */
49: public void poolParametersChanged(ObjectPoolEvent evt);
50:
51: /**
52: * Called when the pool is released (no more events are fired by the pool after this event).
53: */
54: public void poolReleased(ObjectPoolEvent evt);
55: }
|