java.beans.beancontext
Interface BeanContext

All Superinterfaces:
BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild , Collection sample code for java.util.Collection definition code for java.util.Collection , DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode , Iterable sample code for java.lang.Iterable definition code for java.lang.Iterable , Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility
All Known Subinterfaces:
BeanContextServices sample code for java.beans.beancontext.BeanContextServices definition code for java.beans.beancontext.BeanContextServices
All Known Implementing Classes:
BeanContextServicesSupport sample code for java.beans.beancontext.BeanContextServicesSupport definition code for java.beans.beancontext.BeanContextServicesSupport , BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport definition code for java.beans.beancontext.BeanContextSupport

public interface BeanContext
extends BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild , Collection sample code for java.util.Collection definition code for java.util.Collection , DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode , Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility

The BeanContext acts a logical hierarchical container for JavaBeans.

Since:
1.2
See Also:
Beans sample code for java.beans.Beans definition code for java.beans.Beans , BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild , BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener , PropertyChangeEvent sample code for java.beans.PropertyChangeEvent definition code for java.beans.PropertyChangeEvent , java.beans.VetoableChangeEvent, DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode , Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility , Collection sample code for java.util.Collection definition code for java.util.Collection

Field Summary
static Object sample code for java.lang.Object definition code for java.lang.Object globalHierarchyLock sample code for java.beans.beancontext.BeanContext.globalHierarchyLock definition code for java.beans.beancontext.BeanContext.globalHierarchyLock
          This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
 
Fields inherited from interface java.beans.DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode
PROPERTYNAME sample code for java.beans.DesignMode.PROPERTYNAME definition code for java.beans.DesignMode.PROPERTYNAME
 
Method Summary
 void addBeanContextMembershipListener sample code for java.beans.beancontext.BeanContext.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) definition code for java.beans.beancontext.BeanContext.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) (BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener  bcml)
          Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).
 URL sample code for java.net.URL definition code for java.net.URL getResource sample code for java.beans.beancontext.BeanContext.getResource(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContext.getResource(java.lang.String, java.beans.beancontext.BeanContextChild) (String sample code for java.lang.String definition code for java.lang.String  name, BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
          Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 InputStream sample code for java.io.InputStream definition code for java.io.InputStream getResourceAsStream sample code for java.beans.beancontext.BeanContext.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContext.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild) (String sample code for java.lang.String definition code for java.lang.String  name, BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
          Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 Object sample code for java.lang.Object definition code for java.lang.Object instantiateChild sample code for java.beans.beancontext.BeanContext.instantiateChild(java.lang.String) definition code for java.beans.beancontext.BeanContext.instantiateChild(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  beanName)
          Instantiate the javaBean named as a child of this BeanContext.
 void removeBeanContextMembershipListener sample code for java.beans.beancontext.BeanContext.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) definition code for java.beans.beancontext.BeanContext.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) (BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener  bcml)
          Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.
 
Methods inherited from interface java.beans.beancontext.BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild
addPropertyChangeListener sample code for java.beans.beancontext.BeanContextChild.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.beans.beancontext.BeanContextChild.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , addVetoableChangeListener sample code for java.beans.beancontext.BeanContextChild.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.beans.beancontext.BeanContextChild.addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) , getBeanContext sample code for java.beans.beancontext.BeanContextChild.getBeanContext() definition code for java.beans.beancontext.BeanContextChild.getBeanContext() , removePropertyChangeListener sample code for java.beans.beancontext.BeanContextChild.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.beans.beancontext.BeanContextChild.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , removeVetoableChangeListener sample code for java.beans.beancontext.BeanContextChild.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) definition code for java.beans.beancontext.BeanContextChild.removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener) , setBeanContext sample code for java.beans.beancontext.BeanContextChild.setBeanContext(java.beans.beancontext.BeanContext) definition code for java.beans.beancontext.BeanContextChild.setBeanContext(java.beans.beancontext.BeanContext)
 
Methods inherited from interface java.util.Collection sample code for java.util.Collection definition code for java.util.Collection
add sample code for java.util.Collection.add(E) definition code for java.util.Collection.add(E) , addAll sample code for java.util.Collection.addAll(java.util.Collection) definition code for java.util.Collection.addAll(java.util.Collection) , clear sample code for java.util.Collection.clear() definition code for java.util.Collection.clear() , contains sample code for java.util.Collection.contains(java.lang.Object) definition code for java.util.Collection.contains(java.lang.Object) , containsAll sample code for java.util.Collection.containsAll(java.util.Collection) definition code for java.util.Collection.containsAll(java.util.Collection) , equals sample code for java.util.Collection.equals(java.lang.Object) definition code for java.util.Collection.equals(java.lang.Object) , hashCode sample code for java.util.Collection.hashCode() definition code for java.util.Collection.hashCode() , isEmpty sample code for java.util.Collection.isEmpty() definition code for java.util.Collection.isEmpty() , iterator sample code for java.util.Collection.iterator() definition code for java.util.Collection.iterator() , remove sample code for java.util.Collection.remove(java.lang.Object) definition code for java.util.Collection.remove(java.lang.Object) , removeAll sample code for java.util.Collection.removeAll(java.util.Collection) definition code for java.util.Collection.removeAll(java.util.Collection) , retainAll sample code for java.util.Collection.retainAll(java.util.Collection) definition code for java.util.Collection.retainAll(java.util.Collection) , size sample code for java.util.Collection.size() definition code for java.util.Collection.size() , toArray sample code for java.util.Collection.toArray() definition code for java.util.Collection.toArray() , toArray sample code for java.util.Collection.toArray(T[]) definition code for java.util.Collection.toArray(T[])
 
Methods inherited from interface java.beans.DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode
isDesignTime sample code for java.beans.DesignMode.isDesignTime() definition code for java.beans.DesignMode.isDesignTime() , setDesignTime sample code for java.beans.DesignMode.setDesignTime(boolean) definition code for java.beans.DesignMode.setDesignTime(boolean)
 
Methods inherited from interface java.beans.Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility
avoidingGui sample code for java.beans.Visibility.avoidingGui() definition code for java.beans.Visibility.avoidingGui() , dontUseGui sample code for java.beans.Visibility.dontUseGui() definition code for java.beans.Visibility.dontUseGui() , needsGui sample code for java.beans.Visibility.needsGui() definition code for java.beans.Visibility.needsGui() , okToUseGui sample code for java.beans.Visibility.okToUseGui() definition code for java.beans.Visibility.okToUseGui()
 

Field Detail

globalHierarchyLock sample code for java.beans.beancontext.BeanContext.globalHierarchyLock

static final Object sample code for java.lang.Object definition code for java.lang.Object  globalHierarchyLock
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.

Method Detail

instantiateChild sample code for java.beans.beancontext.BeanContext.instantiateChild(java.lang.String) definition code for java.beans.beancontext.BeanContext.instantiateChild(java.lang.String)

Object sample code for java.lang.Object definition code for java.lang.Object  instantiateChild(String sample code for java.lang.String definition code for java.lang.String  beanName)
                        throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                               ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException 
Instantiate the javaBean named as a child of this BeanContext. The implementation of the JavaBean is derived from the value of the beanName parameter, and is defined by the java.beans.Beans.instantiate() method.

Parameters:
beanName - The name of the JavaBean to instantiate as a child of this BeanContext
Throws:
IOException
ClassNotFoundException - if the class identified by the beanName parameter is not found
IOException sample code for java.io.IOException definition code for java.io.IOException
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException

getResourceAsStream sample code for java.beans.beancontext.BeanContext.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContext.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild)

InputStream sample code for java.io.InputStream definition code for java.io.InputStream  getResourceAsStream(String sample code for java.lang.String definition code for java.lang.String  name,
                                BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
                                throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Parameters:
name - the resource name
bcc - the specified child
Returns:
an InputStream for reading the resource, or null if the resource could not be found.
Throws:
IllegalArgumentException - if the resource is not valid
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException

getResource sample code for java.beans.beancontext.BeanContext.getResource(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContext.getResource(java.lang.String, java.beans.beancontext.BeanContextChild)

URL sample code for java.net.URL definition code for java.net.URL  getResource(String sample code for java.lang.String definition code for java.lang.String  name,
                BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
                throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

Parameters:
name - the resource name
bcc - the specified child
Returns:
a URL for the named resource for the specified child
Throws:
IllegalArgumentException - if the resource is not valid
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException

addBeanContextMembershipListener sample code for java.beans.beancontext.BeanContext.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) definition code for java.beans.beancontext.BeanContext.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)

void addBeanContextMembershipListener(BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener  bcml)
Adds the specified BeanContextMembershipListener to receive BeanContextMembershipEvents from this BeanContext whenever it adds or removes a child Component(s).

Parameters:
bcml - the BeanContextMembershipListener to be added

removeBeanContextMembershipListener sample code for java.beans.beancontext.BeanContext.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) definition code for java.beans.beancontext.BeanContext.removeBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener)

void removeBeanContextMembershipListener(BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener  bcml)
Removes the specified BeanContextMembershipListener so that it no longer receives BeanContextMembershipEvents when the child Component(s) are added or removed.

Parameters:
bcml - the BeanContextMembershipListener to be removed