public class LinkRef extends Reference
该名称是一个网址,或一个名称来解决相对于初始上下文,或如果名称的第一个字符是“,”,该名称是相对于链接的上下文中的链接。
上下文操作中的名称的正常解析始终遵循链接。链接名称本身的分辨率可能会导致决议通过其他链接。这引起了一个周期的链接,其分辨率不能正常终止的可能性。作为一个简单的方法,以避免这种非终止决议,服务供应商可以定义的链接的数量的限制,可能涉及在任何一个单一的操作调用的调用方。
一个linkref包含一个单一的stringrefaddr,其类型是“linkaddress”,其内容是链接的名称。引用的类的名称字段是这类(LinkRef)。
LinkRef注定是一名使用正常的背景。()/ rebind(),和()/ rebind()对像中。背景。lookuplink()用于如果终端原子名称绑定到一个链接检索链接本身。
许多命名系统支持可能在命名系统本身使用的链接的本地概念。JNDI没有说明是否有任何关系这样的本地链接和JNDI链接。
一个linkref实例不同步对多线程并发访问。线程需要访问一个linkref实例同时应同步自己提供必要的锁。
LinkException
,
LinkLoopException
,
MalformedLinkException
,
Context.lookupLink(javax.naming.Name)
,
Serialized Form
addrs, classFactory, classFactoryLocation, className
Constructor and Description |
---|
LinkRef(Name linkName)
构建了一个名字linkref。
|
LinkRef(String linkName)
构建一个字符串名称linkref。
|
Modifier and Type | Method and Description |
---|---|
String |
getLinkName()
检索此链接的名称。
|
public LinkRef(Name linkName)
linkName
-非空名为其创建链接。
public LinkRef(String linkName)
linkName
-非空名为其创建链接。
public String getLinkName() throws NamingException
MalformedLinkException
-如果一个链接的名称不能提取
NamingException
-如果遇到一个命名的例外。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.