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