Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.naming

Class NameClassPair

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    Binding

    public class NameClassPair
    extends Object
    implements Serializable
    This class represents the object name and class name pair of a binding found in a context.

    A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of a name and a string representing the package-qualified class name.

    Use subclassing for naming systems that generate contents of a name/class pair dynamically.

    A NameClassPair instance is not synchronized against concurrent access by multiple threads. Threads that need to access a NameClassPair concurrently should synchronize amongst themselves and provide the necessary locking.

    Since:
    1.3
    See Also:
    Context.list(javax.naming.Name), Serialized Form
    • Constructor Detail

      • NameClassPair

        public NameClassPair(String name,
                     String className)
        Constructs an instance of a NameClassPair given its name and class name.
        Parameters:
        name - The non-null name of the object. It is relative to the target context (which is named by the first parameter of the list() method)
        className - The possibly null class name of the object bound to name. It is null if the object bound is null.
        See Also:
        getClassName(), setClassName(java.lang.String), getName(), setName(java.lang.String)
      • NameClassPair

        public NameClassPair(String name,
                     String className,
                     boolean isRelative)
        Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
        Parameters:
        name - The non-null name of the object.
        className - The possibly null class name of the object bound to name. It is null if the object bound is null.
        isRelative - true if name is a name relative to the target context (which is named by the first parameter of the list() method); false if name is a URL string.
        See Also:
        getClassName(), setClassName(java.lang.String), getName(), setName(java.lang.String), isRelative(), setRelative(boolean)
    • Method Detail

      • getClassName

        public String getClassName()
        Retrieves the class name of the object bound to the name of this binding. If a reference or some other indirect information is bound, retrieves the class name of the eventual object that will be returned by Binding.getObject().
        Returns:
        The possibly null class name of object bound. It is null if the object bound is null.
        See Also:
        Binding.getObject(), Binding.getClassName(), setClassName(java.lang.String)
      • getName

        public String getName()
        Retrieves the name of this binding. If isRelative() is true, this name is relative to the target context (which is named by the first parameter of the list()). If isRelative() is false, this name is a URL string.
        Returns:
        The non-null name of this binding.
        See Also:
        isRelative(), setName(java.lang.String)
      • setClassName

        public void setClassName(String name)
        Sets the class name of this binding.
        Parameters:
        name - the possibly null string to use as the class name. If null, Binding.getClassName() will return the actual class name of the object in the binding. The class name will be null if the object bound is null.
        See Also:
        getClassName(), Binding.getClassName()
      • isRelative

        public boolean isRelative()
        Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
        Returns:
        true if the name of this binding is relative to the target context; false if the name of this binding is a URL string.
        See Also:
        setRelative(boolean), getName()
      • setRelative

        public void setRelative(boolean r)
        Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
        Parameters:
        r - If true, the name of binding is relative to the target context; if false, the name of binding is a URL string.
        See Also:
        isRelative(), setName(java.lang.String)
      • getNameInNamespace

        public String getNameInNamespace()
        Retrieves the full name of this binding. The full name is the absolute name of this binding within its own namespace. See Context.getNameInNamespace().

        In naming systems for which the notion of full name does not apply to this binding an UnsupportedOperationException is thrown. This exception is also thrown when a service provider written before the introduction of the method is in use.

        The string returned by this method is not a JNDI composite name and should not be passed directly to context methods.

        Returns:
        The full name of this binding.
        Throws:
        UnsupportedOperationException - if the notion of full name does not apply to this binding in the naming system.
        Since:
        1.5
        See Also:
        setNameInNamespace(java.lang.String), getName()
      • setNameInNamespace

        public void setNameInNamespace(String fullName)
        Sets the full name of this binding. This method must be called to set the full name whenever a NameClassPair is created and a full name is applicable to this binding.

        Setting the full name to null, or not setting it at all, will cause getNameInNamespace() to throw an exception.

        Parameters:
        fullName - The full name to use.
        Since:
        1.5
        See Also:
        getNameInNamespace(), setName(java.lang.String)
      • toString

        public String toString()
        Generates the string representation of this name/class pair. The string representation consists of the name and class name separated by a colon (':'). The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
        Overrides:
        toString in class Object
        Returns:
        The string representation of this name/class pair.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/naming/nameclasspair.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut