1 /* 2 * @(#)BeanContextMembershipListener.java 1.12 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package java.beans.beancontext; 9 10 import java.beans.beancontext.BeanContextMembershipEvent; 11 12 import java.util.EventListener; 13 14 /** 15 * <p> 16 * Compliant BeanContexts fire events on this interface when the state of 17 * the membership of the BeanContext changes. 18 * </p> 19 * 20 * @author Laurence P. G. Cable 21 * @version 1.12, 12/19/03 22 * @since 1.2 23 * @see java.beans.beancontext.BeanContext 24 */ 25 26 public interface BeanContextMembershipListener extends EventListener { 27 28 /** 29 * Called when a child or list of children is added to a 30 * <code>BeanContext</code> that this listener is registered with. 31 * @param bcme The <code>BeanContextMembershipEvent</code> 32 * describing the change that occurred. 33 */ 34 void childrenAdded(BeanContextMembershipEvent bcme); 35 36 /** 37 * Called when a child or list of children is removed 38 * from a <code>BeanContext</code> that this listener 39 * is registered with. 40 * @param bcme The <code>BeanContextMembershipEvent</code> 41 * describing the change that occurred. 42 */ 43 void childrenRemoved(BeanContextMembershipEvent bcme); 44 } 45