Class Overview
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.
Summary
Public Constructors |
|
LinkRef(Name linkName)
Constructs a LinkRef for a name.
|
|
LinkRef(String linkName)
Constructs a LinkRef for a string name.
|
[Expand]
Inherited Methods |
From class
javax.naming.Reference
void
|
add(int posn, RefAddr addr)
Adds an address to the list of addresses at index posn.
|
void
|
add(RefAddr addr)
Adds an address to the end of the list of addresses.
|
void
|
clear()
Deletes all addresses from this reference.
|
Object
|
clone()
Makes a copy of this reference using its class name
list of addresses, class factory name and class factory location.
|
boolean
|
equals(Object obj)
Determines whether obj is a reference with the same addresses
(in same order) as this reference.
|
RefAddr
|
get(int posn)
Retrieves the address at index posn.
|
RefAddr
|
get(String addrType)
Retrieves the first address that has the address type 'addrType'.
|
Enumeration<RefAddr>
|
getAll()
Retrieves an enumeration of the addresses in this reference.
|
String
|
getClassName()
Retrieves the class name of the object to which this reference refers.
|
String
|
getFactoryClassLocation()
Retrieves the location of the factory of the object
to which this reference refers.
|
String
|
getFactoryClassName()
Retrieves the class name of the factory of the object
to which this reference refers.
|
int
|
hashCode()
Computes the hash code of this reference.
|
Object
|
remove(int posn)
Deletes the address at index posn from the list of addresses.
|
int
|
size()
Retrieves the number of addresses in this reference.
|
String
|
toString()
Generates the string representation of this reference.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
public
LinkRef
(Name linkName)
Constructs a LinkRef for a name.
Parameters
linkName
| The non-null name for which to create this link.
|
public
LinkRef
(String linkName)
Constructs a LinkRef for a string name.
Parameters
linkName
| The non-null name for which to create this link.
|
Public Methods
public
String
getLinkName
()
Retrieves the name of this link.
Returns
- The non-null name of this link.