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

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


public interface Component extends Loggable,Persistentable {
  /**
   * get the name of the Service, example: NamingService
   */
  String getName();

  /**
   * get the state of the Service, the status defined in Status class
   */
  State getState();

  /**
   * doCreate the service, do expensive operations etc
   */
  void init() throws Exception;

  /**
   * doDestroy the service, tear down
   */
  void destroy() throws Exception;

}
