/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.org
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.huihoo.jfox.pool;

/**
 * the method a object pool needed
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */


public interface ObjectPool extends ObjectPoolMBean{
  /**
   * retrieve Object from object pool
   * @return
   */
  PoolableObject retrieveObject() throws Exception ;

  /**
   * restore the retrived object to object pool
   * @return true if success, false if failed
   */
  boolean restoreObject(PoolableObject obj);

  /**
   * remove a poolable object from the pool
   * @param obj
   * @return
   */
  boolean removeObject(PoolableObject obj);

}
