KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > naming > spi > InitialContextFactoryBuilder


1 /*
2  * @(#)InitialContextFactoryBuilder.java 1.11 04/07/16
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.naming.spi;
9
10 import java.util.Hashtable JavaDoc;
11 import javax.naming.NamingException JavaDoc;
12
13 /**
14   * This interface represents a builder that creates initial context factories.
15   *<p>
16   * The JNDI framework allows for different initial context implementations
17   * to be specified at runtime. An initial context is created using
18   * an initial context factory. A program can install its own builder
19   * that creates initial context factories, thereby overriding the
20   * default policies used by the framework, by calling
21   * NamingManager.setInitialContextFactoryBuilder().
22   * The InitialContextFactoryBuilder interface must be implemented by
23   * such a builder.
24   *
25   * @author Rosanna Lee
26   * @author Scott Seligman
27   * @version 1.11 04/07/16
28   *
29   * @see InitialContextFactory
30   * @see NamingManager#getInitialContext
31   * @see NamingManager#setInitialContextFactoryBuilder
32   * @see NamingManager#hasInitialContextFactoryBuilder
33   * @see javax.naming.InitialContext
34   * @see javax.naming.directory.InitialDirContext
35   * @since 1.3
36   */

37 public interface InitialContextFactoryBuilder {
38     /**
39       * Creates an initial context factory using the specified
40       * environment.
41       *<p>
42       * The environment parameter is owned by the caller.
43       * The implementation will not modify the object or keep a reference
44       * to it, although it may keep a reference to a clone or copy.
45       *
46       * @param environment Environment used in creating an initial
47       * context implementation. Can be null.
48       * @return A non-null initial context factory.
49       * @exception NamingException If an initial context factory could not be created.
50       */

51     public InitialContextFactory JavaDoc
52     createInitialContextFactory(Hashtable JavaDoc<?,?> environment)
53     throws NamingException JavaDoc;
54 }
55
Popular Tags