public abstract class AbsInitialContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory
Constructor and Description |
---|
AbsInitialContextFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
addExtraConfInEnvironment(java.util.Hashtable environment)
This method should be redefined by subclasses
For some protocols, there is a need to populate environment with some settings
|
protected java.lang.Object[] |
getClassArgs(java.util.Hashtable environment)
Gets the values to give to the constructor of the given class (provided by getWrapperClass())
|
protected java.lang.Class[] |
getClassConstructor()
Gets the arguments of the constructor of the given class (provided by getWrapperClass())
|
javax.naming.Context |
getInitialContext(java.util.Hashtable environment)
Creates an Initial Context for beginning name resolution.
|
protected java.lang.String |
getKey(java.util.Hashtable environment) |
protected abstract java.lang.String |
getReferencingFactory() |
protected abstract java.lang.Class |
getWrapperClass() |
protected void |
init()
This method should be redefined by subclasses
For some protocols, there are some initialization stuff to do
|
protected abstract java.lang.String getReferencingFactory()
protected abstract java.lang.Class getWrapperClass()
public javax.naming.Context getInitialContext(java.util.Hashtable environment) throws javax.naming.NamingException
environment
.getInitialContext
in interface javax.naming.spi.InitialContextFactory
environment
- The possibly null environment specifying information
to be used in the creation of the initial context.javax.naming.NamingException
- If cannot create an initial context.protected java.lang.String getKey(java.util.Hashtable environment)
environment
- env to determine the keyprotected java.lang.Object[] getClassArgs(java.util.Hashtable environment) throws javax.naming.NamingException
environment
- given environmentjavax.naming.NamingException
- if the new InitialContext failsprotected java.lang.Class[] getClassConstructor()
protected void addExtraConfInEnvironment(java.util.Hashtable environment)
environment
- hashtable containing the environmentprotected void init() throws javax.naming.NamingException
javax.naming.NamingException
- if there is an exception