01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.pool;
09:
10: /**
11: * the method a object pool needed
12: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
13: */
14:
15: public interface ObjectPool extends ObjectPoolMBean {
16: /**
17: * retrieve Object from object pool
18: * @return
19: */
20: PoolableObject retrieveObject() throws Exception;
21:
22: /**
23: * restore the retrived object to object pool
24: * @return true if success, false if failed
25: */
26: boolean restoreObject(PoolableObject obj);
27:
28: /**
29: * remove a poolable object from the pool
30: * @param obj
31: * @return
32: */
33: boolean removeObject(PoolableObject obj);
34:
35: }
|