1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.pool;
19
20 /***
21 * A base implementation of <code>PoolableObjectFactory</code>.
22 * <p>
23 * All operations defined here are essentially no-op's.
24 *
25 * @see PoolableObjectFactory
26 * @see BaseKeyedPoolableObjectFactory
27 *
28 * @author Rodney Waldhoff
29 * @version $Revision: 480413 $ $Date: 2006-11-28 22:16:05 -0700 (Tue, 28 Nov 2006) $
30 * @since Pool 1.0
31 */
32 public abstract class BasePoolableObjectFactory implements PoolableObjectFactory {
33 public abstract Object makeObject()
34 throws Exception;
35
36 /*** No-op. */
37 public void destroyObject(Object obj)
38 throws Exception {
39 }
40
41 /***
42 * This implementation always returns <tt>true</tt>.
43 * @return <tt>true</tt>
44 */
45 public boolean validateObject(Object obj) {
46 return true;
47 }
48
49 /*** No-op. */
50 public void activateObject(Object obj)
51 throws Exception {
52 }
53
54 /*** No-op. */
55 public void passivateObject(Object obj)
56 throws Exception {
57 }
58 }