This class cannot be instantiated. It has only static methods.
The mention of URL in the documentation for this class refers to a URL string as defined by RFC 1738 and its related RFCs. It is any string that conforms to the syntax described therein, and may not always have corresponding support in the java.net.URL class or Web browsers.
NamingManager is safe for concurrent access by multiple threads.
Except as otherwise noted,
a Name or environment parameter
passed to any method is owned by the caller.
The implementation will not modify the object or keep a reference
to it, although it may keep a reference to a clone or copy.
| Modifier and Type | Class and Description |
|---|---|
| private static class | NamingManager.
Thrown when an error is encountered while loading and instantiating the context factory classes. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CPE
Constant that holds the name of the environment property into
which |
| private static final String | |
| private static final ClassLoaderValue | |
| pack-priv static final VersionHelper | |
| private static InitialContextFactoryBuilder |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Context | Returns: A context identified byobj.The object identifying the context. obj, Name The name of the context being returned, relative to
name, Context nameCtx, or null if no name is being
specified.
See the getObjectInstance method for
details.The context relative to which nameCtx, Hashtable<?, ?> name is
specified, or null for the default initial context.
See the getObjectInstance method for
details.Environment specifying characteristics of the
resulting context. environment)Retrieves a context identified by |
| public static Context | Returns: A non-null Context object for continuing the operation.The non-null exception that triggered this continuation. cpe)Creates a context in which to continue a context operation. |
| private static InitialContextFactory | |
| public static Context | Returns: A non-null initial context.The possibly null environment properties used when
creating the context. env)Creates an initial context using the specified environment properties. |
| private static synchronized InitialContextFactoryBuilder | getInitialContextFactoryBuilder()
Use this method for accessing initctx_factory_builder while inside an unsynchronized method. |
| pack-priv static ObjectFactoryBuilder | |
| public static Object | Returns: An object created usingrefInfo; or
refInfo if an object cannot be created using
the algorithm described above.The possibly null object for which to create an object. refInfo, Name The name of this object relative to name, Context nameCtx.
Specifying a name is optional; if it is
omitted, name should be null.The context relative to which the nameCtx, Hashtable<?, ?> name
parameter is specified. If null, name is
relative to the default initial context.The possibly null environment to
be used in the creation of the object factory and the object. environment)Creates an instance of an object for the specified object and environment. |
| pack-priv static Resolver | |
| public static Object | Returns: The non-null object representingobj's state for
binding. It could be the object (obj) itself.The non-null object for which to get state to bind. obj, Name The name of this object relative to name, Context nameCtx,
or null if no name is specified.The context relative to which the nameCtx, Hashtable<?, ?> name
parameter is specified, or null if name is
relative to the default initial context.The possibly null environment to
be used in the creation of the state factory and
the object's state. environment)Retrieves the state of an object for binding. |
| public static Context | Returns: A context for resolving URLs with the scheme idscheme;
null if the factory for creating the
context is not found.The non-null scheme-id of the URLs supported by the context. scheme, Hashtable<?, ?> The possibly null environment properties to be
used in the creation of the object factory and the context. environment)Creates a context for the given URL scheme id.
The resulting context is for resolving URLs of the
scheme |
| private static Object | getURLObject(String
the URL scheme id for the context scheme, Object information used to create the context urlInfo, Name name of this object relative to name, Context nameCtxContext whose provider resource file will be searched
for package prefix values (or null if none) nameCtx, Hashtable<?, ?> Environment properties for creating the context environment)Creates an object for the given URL scheme id using the supplied urlInfo. |
| public static boolean | Returns: true if an initial context factory builder has been set; false otherwise.Determines whether an initial context factory builder has been set. |
| public static synchronized void | setInitialContextFactoryBuilder(InitialContextFactoryBuilder
The initial context factory builder to install. If null,
no builder is set. builder)Sets the InitialContextFactory builder to be builder. |
| public static void | setObjectFactoryBuilder(ObjectFactoryBuilder
The factory builder to install. If null, no builder
is installed. builder)The ObjectFactoryBuilder determines the policy used when trying to load object factories. |
| CPE | back to summary |
|---|---|
| public static final String CPE Constant that holds the name of the environment property into
which The value of this constant is "java.naming.spi.CannotProceedException".
| |
| defaultPkgPrefix | back to summary |
|---|---|
| private static final String defaultPkgPrefix | |
| FACTORIES_CACHE | back to summary |
|---|---|
| private static final ClassLoaderValue<InitialContextFactory> FACTORIES_CACHE | |
| helper | back to summary |
|---|---|
| pack-priv static final VersionHelper helper | |
| initctx_factory_builder | back to summary |
|---|---|
| private static InitialContextFactoryBuilder initctx_factory_builder | |
| NamingManager | back to summary |
|---|---|
| pack-priv NamingManager() | |
| getContext | back to summary |
|---|---|
| pack-priv static Context getContext(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException Retrieves a context identified by
| |
| getContinuationContext | back to summary |
|---|---|
| public static Context getContinuationContext(CannotProceedException cpe) throws NamingException Creates a context in which to continue a context operation.
In performing an operation on a name that spans multiple
namespaces, a context from one naming system may need to pass
the operation on to the next naming system. The context
implementation does this by first constructing a
Before making use of the
| |
| getFactory | back to summary |
|---|---|
| private static InitialContextFactory getFactory(String className) | |
| getInitialContext | back to summary |
|---|---|
| public static Context getInitialContext(Hashtable<?, ?> env) throws NamingException Creates an initial context using the specified environment properties. This is done as follows:
| |
| getInitialContextFactoryBuilder | back to summary |
|---|---|
| private static synchronized InitialContextFactoryBuilder getInitialContextFactoryBuilder() Use this method for accessing initctx_factory_builder while inside an unsynchronized method. | |
| getObjectFactoryBuilder | back to summary |
|---|---|
| pack-priv static ObjectFactoryBuilder getObjectFactoryBuilder() Used for accessing object factory builder. | |
| getObjectInstance | back to summary |
|---|---|
| public static Object getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception Creates an instance of an object for the specified object and environment. If an object factory builder has been installed, it is used to create a factory for creating the object. Otherwise, the following rules are used to create the object:
Service providers that implement the
Note that an object factory (an object that implements the ObjectFactory
interface) must be public and must have a public constructor that
accepts no arguments.
In cases where the factory is in a named module then it must be in a
package which is exported by that module to the
The
| |
| getResolver | back to summary |
|---|---|
| pack-priv static Resolver getResolver(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException | |
| getStateToBind | back to summary |
|---|---|
| public static Object getStateToBind(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException Retrieves the state of an object for binding.
Service providers that implement the
This method uses the specified state factories in
the
Note that a state factory
(an object that implements the StateFactory
interface) must be public and must have a public constructor that
accepts no arguments.
In cases where the factory is in a named module then it must be in a
package which is exported by that module to the
The
This method may return a
| |
| getURLContext | back to summary |
|---|---|
| public static Context getURLContext(String scheme, Hashtable<?, ?> environment) throws NamingException Creates a context for the given URL scheme id.
The resulting context is for resolving URLs of the
scheme
The class name of the factory that creates the resulting context
has the naming convention scheme-idURLContextFactory
(e.g. "ftpURLContextFactory" for the "ftp" scheme-id),
in the package specified as follows.
The
For example, if the scheme id is "ldap", and the
If a factory is instantiated, it is invoked with the following parameters to produce the resulting context.
For example, invoking getObjectInstance() as shown above on a LDAP URL context factory would return a context that can resolve LDAP urls (e.g. "ldap://ldap.wiz.com/o=wiz,c=us", "ldap://ldap.umich.edu/o=umich,c=us", ...).
Note that an object factory (an object that implements the ObjectFactory
interface) must be public and must have a public constructor that
accepts no arguments.
In cases where the factory is in a named module then it must be in a
package which is exported by that module to the
| |
| getURLObject | back to summary |
|---|---|
| private static Object getURLObject(String scheme, Object urlInfo, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException Creates an object for the given URL scheme id using the supplied urlInfo. If urlInfo is null, the result is a context for resolving URLs with the scheme id 'scheme'. If urlInfo is a URL, the result is a context named by the URL. Names passed to this context is assumed to be relative to this context (i.e. not a URL). For example, if urlInfo is "ldap://ldap.wiz.com/o=Wiz,c=us", the resulting context will be that pointed to by "o=Wiz,c=us" on the server 'ldap.wiz.com'. Subsequent names that can be passed to this context will be LDAP names relative to this context (e.g. cn="Barbs Jensen"). If urlInfo is an array of URLs, the URLs are assumed to be equivalent in terms of the context to which they refer. The resulting context is like that of the single URL case. If urlInfo is of any other type, that is handled by the context factory for the URL scheme.
| |
| hasInitialContextFactoryBuilder | back to summary |
|---|---|
| public static boolean hasInitialContextFactoryBuilder() Determines whether an initial context factory builder has been set.
| |
| setInitialContextFactoryBuilder | back to summary |
|---|---|
| public static synchronized void setInitialContextFactoryBuilder(InitialContextFactoryBuilder builder) throws NamingException Sets the InitialContextFactory builder to be builder.
| |
| setObjectFactoryBuilder | back to summary |
|---|---|
| public static void setObjectFactoryBuilder(ObjectFactoryBuilder builder) throws NamingException The ObjectFactoryBuilder determines the policy used when trying to load object factories. See getObjectInstance() and class ObjectFactory for a description of the default policy. setObjectFactoryBuilder() overrides this default policy by installing an ObjectFactoryBuilder. Subsequent object factories will be loaded and created using the installed builder.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public NoInitialContextException | getCause()
Overrides java. Returns the cause of this throwable or |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID Hides java. | |
| FactoryInitializationError | back to summary |
|---|---|
| private FactoryInitializationError(NoInitialContextException cause) | |
| getCause | back to summary |
|---|---|
| public NoInitialContextException getCause() Overrides java. Doc from java. Returns the cause of this throwable or This implementation returns the cause that was supplied via one of
the constructors requiring a
| |