01: /*
02: DBPool - JDBC Connection Pool Manager
03: Copyright (c) Giles Winstanley
04: */
05: package snaq.db;
06:
07: import snaq.util.ObjectPool;
08: import snaq.util.ObjectPoolEvent;
09:
10: /**
11: * Event for ConnectionPool objects.
12: * @author Giles Winstanley
13: */
14: public class ConnectionPoolEvent extends ObjectPoolEvent {
15: public static final int VALIDATION_ERROR = 9;
16:
17: protected ConnectionPoolEvent(ObjectPool pool, int type) {
18: super (pool, type);
19: }
20:
21: public ConnectionPool getConnectionPool() {
22: return (ConnectionPool) getSource();
23: }
24:
25: /* public String getTypeString()
26: {
27: switch(getType())
28: {
29: case VALIDATION_ERROR: return "VALIDATION_ERROR";
30: }
31: return super.getTypeString();
32: }*/
33:
34: public boolean isValidationError() {
35: return getType() == VALIDATION_ERROR;
36: }
37: }
|