1 /* JFox, the OpenSource J2EE Application Server2 *3 * Distributable under GNU LGPL license by gun.org4 * more details please visit http://www.huihoo.org/jfox5 */6 package org.jfox.ioc.ext;7 8 9 10 /**11 * 可以启动和停止的组件,要成为服务的组件应该实现该接口。12 *13 * 在生成组件实例的时候,容器会调用start方法对组件实例进行启动。14 * 在Registry停止的时候,会调用stop方法停止组件。15 *16 * @author <a HREF="mailto:young_yy@hotmail.com">Young Yang</a>17 */18 19 public interface ServicableComponent extends SingletonComponent {20 21 /**22 * 启动组件23 * @throws Exception24 */25 public void start() throws Exception ;26 27 /**28 * 停止组件29 * @throws Exception30 */31 public void stop() throws Exception ;32 33 /**34 * 组件是否启动35 */36 public boolean isStarted();37 38 }