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;7 8 9 10 /**11 * 所有能注册到IoC容器中的组件的必须要实现该接口12 *13 * @author <a HREF="mailto:young_yy@hotmail.com">Young Yang</a>14 */15 16 public interface Component {17 /**18 * 在从Registry中得到组件实例之后,Registry会回调该方法设置组件的上下文环境。19 * 如果你需要组件的上下文,则需要在实现该方法的时候,保存该ComponentContext。20 *21 * @param ctx22 */23 void setComponentContext(ComponentContext ctx);24 25 }