java.beans.beancontext

Interface BeanContextMembershipListener

All Superinterfaces:
EventListener

public interface BeanContextMembershipListener
extends EventListener

Compliant BeanContexts fire events on this interface when the state of the membership of the BeanContext changes.
Since:
1.2
See Also:
BeanContext

Method Summary

void
childrenAdded(BeanContextMembershipEvent bcme)
Called when a child or list of children is added to a BeanContext that this listener is registered with.
void
childrenRemoved(BeanContextMembershipEvent bcme)
Called when a child or list of children is removed from a BeanContext that this listener is registered with.

Method Details

childrenAdded

public void childrenAdded(BeanContextMembershipEvent bcme)
Called when a child or list of children is added to a BeanContext that this listener is registered with.
Parameters:
bcme - The BeanContextMembershipEvent describing the change that occurred.
Usages and Demos :

View More Examples of childrenAdded(BeanContextMembershipEvent bcme)
   1: import java.beans.beancontext.BeanContextMembershipEvent;
   2: import java.beans.beancontext.BeanContextMembershipListener;
   3: import java.beans.beancontext.BeanContextProxy;
   4:         ...
   5:     private transient Map<Object, BCChild> _children;
   6:     private transient List<BeanContextMembershipListener> _bcMembershipListeners;
   7: 
   8:         ...
   9: 
  10:     public void addBeanContextMembershipListener(BeanContextMembershipListener bcml) {
  11:         _bcMembershipListeners.add(bcml);
  12:         ...
  13:             if (childrenAdded) {
  14:                 bcml.childrenAdded(bcme);

View Full Code Here

childrenRemoved

public void childrenRemoved(BeanContextMembershipEvent bcme)
Called when a child or list of children is removed from a BeanContext that this listener is registered with.
Parameters:
bcme - The BeanContextMembershipEvent describing the change that occurred.
Usages and Demos :

View More Examples of childrenRemoved(BeanContextMembershipEvent bcme)
   1: import java.beans.beancontext.BeanContextMembershipEvent;
   2: import java.beans.beancontext.BeanContextMembershipListener;
   3: import java.beans.beancontext.BeanContextProxy;
   4:         ...
   5:     private transient Map<Object, BCChild> _children;
   6:     private transient List<BeanContextMembershipListener> _bcMembershipListeners;
   7: 
   8:         ...
   9: 
  10:     public void addBeanContextMembershipListener(BeanContextMembershipListener bcml) {
  11:         _bcMembershipListeners.add(bcml);
  12:         ...
  13:             else {
  14:                 bcml.childrenRemoved(bcme);

View Full Code Here