|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.naming.genericURLContextFactory
public class genericURLContextFactory
This class is part of a framework that enables applications to easily create a local name space associated with a given URL scheme. A local name space created with this framework is shared across a process. That is, all threads running in a JVM instance will use the same name space instance.
This class serves as the base class for a local name space's object factory. When a JNDI Context method is invoked with a name URL having a local name space's URL scheme, the getObjectInstance method implemented by this class is invoked by the JNDI Naming Manager as a JNDI SPI. The method creates and returns an instance for the root context of the name space.
The name space's object factory should subclass this class and should have the name some.package.scheme.schemeURLContextFactory, where scheme is the URL scheme. The package name for the class is arbitrary, but the last component of the package name must be scheme.
For example, a local name space for the URL scheme, myscheme, should have an object factory with the class name, some.package.myscheme.myschemeURLContextFactory. The object factory implementation for URL scheme myscheme is shown below.
package com.mycompany.myscheme; public class myschemeURLContextFactory extends com.ibm.websphere.naming.genericURLContextFactory { public myschemeURLContextFactory() { super("myscheme"); } }
Before an object factory can be used, the local name space for that URL scheme
must be set up. To set up a local name space, you must obtain an initial context using
the initial context factory, genericURLInitialContextFactory
.
Refer to the documententation for that class for usage details.
genericURLInitialContextFactory
Constructor Summary | |
---|---|
genericURLContextFactory(java.lang.String schemeId)
This constructor is invoked by the subclass's empty constructor. |
Method Summary | |
---|---|
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
This method is invoked as a JNDI SPI by the JNDI Naming Manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public genericURLContextFactory(java.lang.String schemeId)
schemeID
- The URL scheme associated with this name space. The subclass name
must be some.package.schemeID.schemeIDURLContextFactory.Method Detail |
---|
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws javax.naming.NamingException
getObjectInstance
in interface javax.naming.spi.ObjectFactory
javax.naming.NamingException
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |