|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.carol.jndi.spi.AbsInitialContextFactory
Instantiate the class of the given SPI and Handle a cache mechanism for storing contexts. It avoids to build new Context. When wanting to integrate a new protocol, extends this class and define getReferencingFactory() and getWrapperClass() method. Also, there are some others methods that you could redefine like init() or addExtraConfInEnvironment() to your specific needs.
| Constructor Summary | |
AbsInitialContextFactory()
|
|
| Method Summary | |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbsInitialContextFactory()
| Method Detail |
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.InitialContextFactoryenvironment - 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 key
protected java.lang.Object[] getClassArgs(java.util.Hashtable environment)
throws javax.naming.NamingException
environment - given environment
javax.naming.NamingException - if the new InitialContext failsprotected java.lang.Class[] getClassConstructor()
protected void addExtraConfInEnvironment(java.util.Hashtable environment)
environment - hashtable containing the environment
protected void init()
throws javax.naming.NamingException
javax.naming.NamingException - if there is an exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||