/* 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;

/**
 * 
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */


public interface PoolableObject {

  /**
   * actvite the object before it be retrived
   */
  void activate() throws Exception;

  /**
   * passivate the object before it be restored, set the status to initialized
   */
  void passivate() throws Exception;

  /**
   * 表明该对象是否能返回到池中
   * 注意,如果一个对象已在池中,该方法也应该返回 false,表明该对象不可被使用
   */
  boolean isAvailable();

}