javax.naming.spi

Interface ObjectFactoryBuilder


  • public interface ObjectFactoryBuilder
    This interface represents a builder that creates object factories.

    The JNDI framework allows for object implementations to be loaded in dynamically via object factories. For example, when looking up a printer bound in the name space, if the print service binds printer names to References, the printer Reference could be used to create a printer object, so that the caller of lookup can directly operate on the printer object after the lookup. An ObjectFactory is responsible for creating objects of a specific type. JNDI uses a default policy for using and loading object factories. You can override this default policy by calling NamingManager.setObjectFactoryBuilder() with an ObjectFactoryBuilder, which contains the program-defined way of creating/loading object factories. Any ObjectFactoryBuilder implementation must implement this interface that for creating object factories.

    Since:
    1.3
    See Also:
    ObjectFactory, NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable<?, ?>), NamingManager.setObjectFactoryBuilder(javax.naming.spi.ObjectFactoryBuilder)
    • Method Detail

      • createObjectFactory

        ObjectFactory createObjectFactory(Object obj,
                                        Hashtable<?,?> environment)
                                          throws NamingException
        Creates a new object factory using the environment supplied.

        The environment parameter 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.

        Parameters:
        obj - The possibly null object for which to create a factory.
        environment - Environment to use when creating the factory. Can be null.
        Returns:
        A non-null new instance of an ObjectFactory.
        Throws:
        NamingException - If an object factory cannot be created.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 30/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/naming/spi/objectfactorybuilder.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ObjectFactoryBuilder

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut