1 /* JFox, the OpenSource J2EE Application Server2 *3 * Distributable under GNU LGPL license by gun.org4 * more details please visit http://www.huihoo.org/jfox5 */6 7 package org.jfox.pool;8 9 /**10 * @author <a HREF="mailto:young_yy@hotmail.com">Young Yang</a>11 */12 13 14 public interface ObjectFactory {15 16 Class getObjectClass();17 18 /**19 * create a new poolable object20 *21 * @return22 */23 PoolableObject makeObject() throws Exception ;24 25 /**26 * destroy a poolabled object27 *28 * @param object29 */30 void destroyObject(PoolableObject object) throws Exception ;31 32 /**33 * Ensures that the instance is safe to be returned by the pool34 *35 * @param object36 * @return37 */38 boolean validateObject(PoolableObject object);39 40 }41