1 /** 2 * Copyright (C) 2003-2005 Funambol 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 package sync4j.framework.tools.beans; 19 20 /** 21 * This interface models beans that supports or requires lazy initialization. 22 * When a bean is created, first of all the empty constructor is created and 23 * the the bean properties are set. If a bean requires that its properties have 24 * a proper value when initialization is performed it should implement 25 * <i>LazyInitBean</i>, so that the caller has an opportunity to separately 26 * initialize the bean after its creation, but before using it.<br> 27 * The described mechanism is used in BeanFactory when an instance of the bean 28 * is created. If the bean implements <i>LazyInitBean</i> after creating the bean 29 * the method init() is called. 30 * 31 * @see BeanFactory 32 * 33 * @author Stefano Fornari @ Funambol 34 * @version $Id: LazyInitBean.java,v 1.4 2005/03/02 20:57:38 harrie Exp $ 35 */ 36 public interface LazyInitBean { 37 public void init() throws BeanInitializationException; 38 }