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

package org.huihoo.jfox.pool;

import org.huihoo.jfox.service.ComponentSupportMBean;

/**
 * the interface that want to expose to jmx
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */


public interface ObjectPoolMBean extends ComponentSupportMBean{
  /**
   * Clears any objects sitting idle in the pool, releasing any associated resources
   */
  void clear();

  /**
   * get the factory use to create new instances
   */
  ObjectFactory getObjectFactory();

  /**
   * get the pooled object's class type, it return by object pool's factory
   * @return
   */
  String getObjectClass();

  /**
   * get the count of working object
   * @return
   */
  int getWorking();

  /**
   * get the count of rest object
   * @return
   */
  int getRest();

}
