diff options
Diffstat (limited to 'javax/naming/spi/InitialContextFactory.java')
-rw-r--r-- | javax/naming/spi/InitialContextFactory.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/javax/naming/spi/InitialContextFactory.java b/javax/naming/spi/InitialContextFactory.java index 7bfcf095e..d9b3336dc 100644 --- a/javax/naming/spi/InitialContextFactory.java +++ b/javax/naming/spi/InitialContextFactory.java @@ -43,7 +43,28 @@ import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingException; +/** + * <p> + * Defines a factory that creates the initial context for the beginning of the + * name resolution. JNDI allows to specify different implementations of the + * initial context at runtime. + * </p> + * <p> + * The class, implementing this interface, must be public and have a public + * parameterless constructor + * </p> + */ public interface InitialContextFactory { - Context getInitialContext (Hashtable environment) throws NamingException; + /** + * Create a new initial context + * + * @param environment the properties, used when creating the context. The + * implementing class will not modify the table nor keep the + * reference to it. After the method returns, the caller can safely + * reuse the table for other purposes. + * @return the new initial context + * @throws NamingException if the naming exception has occured + */ + Context getInitialContext(Hashtable environment) throws NamingException; } |