| java.lang.Object org.mortbay.component.Container
All known Subclasses: org.mortbay.management.MBeanContainer,
Container | public class Container (Code) | | Container.
This class allows a containment events to be generated from update methods.
The style of usage is:
public void setFoo(Foo foo)
{
getContainer().update(this,this.foo,foo,"foo");
this.foo=foo;
}
public void setBars(Bar[] bars)
{
getContainer().update(this,this.bars,bars,"bar");
this.bars=bars;
}
author: gregw |
Inner Class :public static class Relationship | |
Method Summary | |
public void | addBean(Object obj) | public synchronized void | addEventListener(Container.Listener listener) | public void | removeBean(Object obj) | public synchronized void | removeEventListener(Container.Listener listener) | public synchronized void | update(Object parent, Object oldChild, Object child, String relationship) Update single parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChild - The previous value of the child. | public synchronized void | update(Object parent, Object oldChild, Object child, String relationship, boolean addRemove) Update single parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChild - The previous value of the child. | public synchronized void | update(Object parent, Object[] oldChildren, Object[] children, String relationship) Update multiple parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChildren - The previous array of children. | public synchronized void | update(Object parent, Object[] oldChildren, Object[] children, String relationship, boolean addRemove) Update multiple parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChildren - The previous array of children. |
update | public synchronized void update(Object parent, Object oldChild, Object child, String relationship)(Code) | | Update single parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChild - The previous value of the child. If this is non null and differs from child , then a remove event is generated. Parameters: child - The current child. If this is non null and differs from oldChild , then an add event is generated. Parameters: relationship - The name of the relationship |
update | public synchronized void update(Object parent, Object oldChild, Object child, String relationship, boolean addRemove)(Code) | | Update single parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChild - The previous value of the child. If this is non null and differs from child , then a remove event is generated. Parameters: child - The current child. If this is non null and differs from oldChild , then an add event is generated. Parameters: relationship - The name of the relationship Parameters: addRemoveBean - If true add/remove is called for the new/old children as well as the relationships |
update | public synchronized void update(Object parent, Object[] oldChildren, Object[] children, String relationship)(Code) | | Update multiple parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChildren - The previous array of children. A remove event is generated for any child in this array but not in the children array.This array is modified and children that remain in the new children array are nulled out of the old children array. Parameters: children - The current array of children. An add event is generated for any child in this array but not in the oldChildren array. Parameters: relationship - The name of the relationship |
update | public synchronized void update(Object parent, Object[] oldChildren, Object[] children, String relationship, boolean addRemove)(Code) | | Update multiple parent to child relationship.
Parameters: parent - The parent of the child. Parameters: oldChildren - The previous array of children. A remove event is generated for any child in this array but not in the children array.This array is modified and children that remain in the new children array are nulled out of the old children array. Parameters: children - The current array of children. An add event is generated for any child in this array but not in the oldChildren array. Parameters: relationship - The name of the relationship Parameters: addRemoveBean - If true add/remove is called for the new/old children as well as the relationships |
|
|