Chapter 24. The javax.naming.spi PackageThe javax.naming.spi package defines the service provider interface (SPI) for JNDI. Only system programmers who are developing JNDI providers need to use this package; JNDI application programmers can ignore it. The classes and interfaces in this package allow JNDI service providers to be plugged in underneath the JNDI API. Figure 24-1 shows the hierarchy of this package. Figure 24-1. The javax.naming.spi package
DirectoryManager is a subclass of NamingManager that contains a method for creating javax.naming.directory.DirContext objects.
Hierarchy: Object-->NamingManager-->DirectoryManager
This interface represents a factory that creates an initial context for a naming or directory service. The initial context serves as the entry point into the service. A JNDI service provider always includes an InitialContextFactory that can be used as the value of the java.naming.factory.initial property
Returned By: InitialContextFactoryBuilder.createInitialContextFactory()
This interface represents a builder that creates initial context factories. A program can override the default initial context factory builder by calling NamingManager.setInitialContextFactoryBuilder() and specifying a new builder. Such a builder must implement this interface.
Passed To: NamingManager.setInitialContextFactoryBuilder()
The NamingManager class contains methods for creating javax.naming.Context objects and otherwise controlling the operation of the underlying service provider.
Subclasses: DirectoryManager
This interface represents a factory for creating objects. JNDI supports the dynamic loading of object implementations with object factories. For example, say you have a naming system that binds file objects to names in the namespace. If the filesystem service provider binds filenames to Reference objects, a Reference object can create a file object through an object factory. This means that a call to lookup() a filename (in the appropriate Context) returns an actual file object the programmer can manipulate as necessary. An ObjectFactory is responsible for creating objects of a specific type.
Returned By: ObjectFactoryBuilder.createObjectFactory()
This interface represents a builder that creates object factories. A program can override the default object factory builder by calling NamingManager.setObjectFactoryBuilder() and specifying a new builder. Such a builder must implement this interface.
Passed To: NamingManager.setObjectFactoryBuilder()
The Resolver interface contains methods that are implemented by objects that can act as intermediate contexts for naming resolution purposes.
This class represents the result of resolving a name.
Returned By: Resolver.resolveToClass() Copyright © 2001 O'Reilly & Associates. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|