src/share/classes/javax/naming/Context.java

Print this page




 261  * <p>
 262  * When a service provider needs to determine the value of a property,
 263  * it will generally take that value directly from the environment.
 264  * A service provider may define provider-specific properties
 265  * to be placed in its own provider resource file.  In that
 266  * case it should merge values as described in the previous paragraph.
 267  *
 268  * <p>
 269  * In this way, each service provider developer can specify a list of
 270  * factories to use with that service provider. These can be modified by
 271  * the application resources specified by the deployer of the application
 272  * or applet, which in turn can be modified by the user.
 273  *
 274  * @author Rosanna Lee
 275  * @author Scott Seligman
 276  * @author R. Vasudevan
 277  *
 278  * @since 1.3
 279  */
 280 
 281 public interface Context {
 282 
 283     /**
 284      * Retrieves the named object.
 285      * If <tt>name</tt> is empty, returns a new instance of this context
 286      * (which represents the same naming context as this context, but its
 287      * environment may be modified independently and it may be accessed
 288      * concurrently).
 289      *
 290      * @param name
 291      *          the name of the object to look up
 292      * @return  the object bound to <tt>name</tt>
 293      * @throws  NamingException if a naming exception is encountered
 294      *
 295      * @see #lookup(String)
 296      * @see #lookupLink(Name)
 297      */
 298     public Object lookup(Name name) throws NamingException;
 299 
 300     /**
 301      * Retrieves the named object.




 261  * <p>
 262  * When a service provider needs to determine the value of a property,
 263  * it will generally take that value directly from the environment.
 264  * A service provider may define provider-specific properties
 265  * to be placed in its own provider resource file.  In that
 266  * case it should merge values as described in the previous paragraph.
 267  *
 268  * <p>
 269  * In this way, each service provider developer can specify a list of
 270  * factories to use with that service provider. These can be modified by
 271  * the application resources specified by the deployer of the application
 272  * or applet, which in turn can be modified by the user.
 273  *
 274  * @author Rosanna Lee
 275  * @author Scott Seligman
 276  * @author R. Vasudevan
 277  *
 278  * @since 1.3
 279  */
 280 
 281 public interface Context extends AutoCloseable {
 282 
 283     /**
 284      * Retrieves the named object.
 285      * If <tt>name</tt> is empty, returns a new instance of this context
 286      * (which represents the same naming context as this context, but its
 287      * environment may be modified independently and it may be accessed
 288      * concurrently).
 289      *
 290      * @param name
 291      *          the name of the object to look up
 292      * @return  the object bound to <tt>name</tt>
 293      * @throws  NamingException if a naming exception is encountered
 294      *
 295      * @see #lookup(String)
 296      * @see #lookupLink(Name)
 297      */
 298     public Object lookup(Name name) throws NamingException;
 299 
 300     /**
 301      * Retrieves the named object.