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