com.ibm.websphere.naming
Class genericURLContextFactory
- java.lang.Object
com.ibm.websphere.naming.genericURLContextFactory
- public class genericURLContextFactory
- extends java.lang.Object
- implements javax.naming.spi.ObjectFactory
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,
.
Refer to the documententation for that class for usage details.
genericURLInitialContextFactory
Constructor Summary
Constructor and Description |
---|
genericURLContextFactory(java.lang.String schemeId)
This constructor is invoked by the subclass's empty constructor.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
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
genericURLContextFactory
- public genericURLContextFactory( java.lang.String schemeId)
Method Detail
getObjectInstance
- 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
javax.naming.spi.ObjectFactory
.
getObjectInstance
in interface javax.naming.spi.ObjectFactory
javax.naming.NamingException