home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / beans / beancontext / BeanContext.java next >
Encoding:
Java Source  |  1998-03-20  |  2.3 KB  |  85 lines

  1. /*
  2.  * @(#)BeanContext.java    1.12 98/03/18
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.beans.beancontext;
  16.  
  17. import java.beans.DesignMode;
  18. import java.beans.Visibility;
  19.  
  20. import java.io.InputStream;
  21. import java.io.IOException;
  22.  
  23. import java.net.URL;
  24.  
  25. import java.util.Collection;
  26. import java.util.Locale;
  27.  
  28. /**
  29.  * <p>
  30.  * The BeanContext acts a logical heirarchical container for JavaBeans.
  31.  * </p>
  32.  *
  33.  * @author Laurence P. G. Cable
  34.  * @version 1.9
  35.  * @since JDK1.2
  36.  *
  37.  * @seealso java.beans.Beans
  38.  * @seealso java.beans.beancontext.BeanContextChild
  39.  * @seealso java.beans.beancontext.BeanContextListener
  40.  * @seealso java.beans.PropertyChangeEvent
  41.  * @seealso java.beans.VetoableChangeEvent
  42.  * @seealso java.beans.DesignMode
  43.  * @seealso java.beans.Visibility
  44.  * @seealso java.util.Collection
  45.  */
  46.  
  47. public interface BeanContext extends BeanContextChild, Collection, DesignMode, Visibility {
  48.  
  49.     /**
  50.      * Instantiate the javaBean named as a child of this BeanContext
  51.      *
  52.      * @param beanName The name of the JavaBean to instantiate as a child of this BeanContext
  53.      */
  54.  
  55.     Object instantiateChild(String beanName) throws IOException, ClassNotFoundException;
  56.  
  57.     /**
  58.      * @return an InputStream to the named resource for the specified child
  59.      *
  60.      * @throw IllegalArgumentException
  61.      */
  62.  
  63.     InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException;
  64.  
  65.     /**
  66.      * @return a URL for the named resource for the specified child
  67.      *
  68.      * @throw IllegalArgumentException
  69.      */
  70.  
  71.     URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException;
  72.  
  73.      /**
  74.       * add a BeanContextMembershipListener
  75.       */
  76.  
  77.     void addBeanContextMembershipListener(BeanContextMembershipListener bcml);
  78.  
  79.      /**
  80.       * remove a BeanContextMembershipListener
  81.       */
  82.  
  83.     void removeBeanContextMembershipListener(BeanContextMembershipListener bcml);
  84. }
  85.