- java.lang.Object
-
- javax.naming.Reference
-
- javax.naming.LinkRef
-
- All Implemented Interfaces:
- Serializable, Cloneable
public class LinkRef extends Reference
This class represents a Reference whose contents is a name, called the link name, that is bound to an atomic name in a context.The name is a URL, or a name to be resolved relative to the initial context, or if the first character of the name is ".", the name is relative to the context in which the link is bound.
Normal resolution of names in context operations always follow links. Resolution of the link name itself may cause resolution to pass through other links. This gives rise to the possibility of a cycle of links whose resolution could not terminate normally. As a simple means to avoid such non-terminating resolutions, service providers may define limits on the number of links that may be involved in any single operation invoked by the caller.
A LinkRef contains a single StringRefAddr, whose type is "LinkAddress", and whose contents is the link name. The class name field of the Reference is that of this (LinkRef) class.
LinkRef is bound to a name using the normal Context.bind()/rebind(), and DirContext.bind()/rebind(). Context.lookupLink() is used to retrieve the link itself if the terminal atomic name is bound to a link.
Many naming systems support a native notion of link that may be used within the naming system itself. JNDI does not specify whether there is any relationship between such native links and JNDI links.
A LinkRef instance is not synchronized against concurrent access by multiple threads. Threads that need to access a LinkRef instance concurrently should synchronize amongst themselves and provide the necessary locking.
- Since:
- 1.3
- See Also:
LinkException
,LinkLoopException
,MalformedLinkException
,Context.lookupLink(javax.naming.Name)
, Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
-
-
Constructor Summary
Constructors Constructor and Description LinkRef(Name linkName)
Constructs a LinkRef for a name.LinkRef(String linkName)
Constructs a LinkRef for a string name.
-
Method Summary
Methods Modifier and Type Method and Description String
getLinkName()
Retrieves the name of this link.-
Methods inherited from class javax.naming.Reference
add, add, clear, clone, equals, get, get, getAll, getClassName, getFactoryClassLocation, getFactoryClassName, hashCode, remove, size, toString
-
-
-
-
Constructor Detail
-
LinkRef
public LinkRef(Name linkName)
Constructs a LinkRef for a name.- Parameters:
linkName
- The non-null name for which to create this link.
-
LinkRef
public LinkRef(String linkName)
Constructs a LinkRef for a string name.- Parameters:
linkName
- The non-null name for which to create this link.
-
-
Method Detail
-
getLinkName
public String getLinkName() throws NamingException
Retrieves the name of this link.- Returns:
- The non-null name of this link.
- Throws:
MalformedLinkException
- If a link name could not be extractedNamingException
- If a naming exception was encountered.
-
-
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.
Version en cache
21/11/2024 21:22:21 Cette version de la page est en cache (à la date du 21/11/2024 21:22:21) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 29/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/naming/linkref.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
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.