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

/**
 * 
 * @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 system, do expensive operations etc
   */
  void init() throws Exception;

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

}