Package fr.dyade.aaa.jndi2.client
Class NamingContextFactory
- java.lang.Object
-
- fr.dyade.aaa.jndi2.client.NamingContextFactory
-
- All Implemented Interfaces:
InitialContextFactory
public class NamingContextFactory extends Object implements InitialContextFactory
-
-
Field Summary
Fields Modifier and Type Field Description static StringJAVA_HOST_PROPERTYName of the property which defines the host name used when creating an initial context using this factory.static StringJAVA_PORT_PROPERTYName of the property which defines the listener port used when creating an initial context using this factory.static StringSCN_HOST_PROPERTYSpecific property.static StringSCN_PORT_PROPERTYSpecific property.static StringSCN_PROVIDER_URLSpecific property.
-
Constructor Summary
Constructors Constructor Description NamingContextFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextgetInitialContext(Hashtable env)static NamingConnectiongetNamingConnection(Hashtable env)
-
-
-
Field Detail
-
JAVA_PORT_PROPERTY
public static final String JAVA_PORT_PROPERTY
Name of the property which defines the listener port used when creating an initial context using this factory.- See Also:
- Constant Field Values
-
JAVA_HOST_PROPERTY
public static final String JAVA_HOST_PROPERTY
Name of the property which defines the host name used when creating an initial context using this factory.- See Also:
- Constant Field Values
-
SCN_PORT_PROPERTY
public static final String SCN_PORT_PROPERTY
Specific property. It is useful when several naming provider use the same property.- See Also:
- Constant Field Values
-
SCN_HOST_PROPERTY
public static final String SCN_HOST_PROPERTY
Specific property. It is useful when several naming provider use the same property.- See Also:
- Constant Field Values
-
SCN_PROVIDER_URL
public static final String SCN_PROVIDER_URL
Specific property. It is useful when several naming provider use the same property.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInitialContext
public Context getInitialContext(Hashtable env) throws NamingException
- Specified by:
getInitialContextin interfaceInitialContextFactory- Parameters:
env- This contains the hostname and the port.- Returns:
- A JNDI initial context.
- Throws:
NamingException- Thrown if the host and port properties aren't strings, if the port string does not represent a valid number, or if an exception is thrown from the NamingContext constructor.
-
getNamingConnection
public static NamingConnection getNamingConnection(Hashtable env) throws NamingException
- Throws:
NamingException
-
-