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