org.objectweb.naming
Interface Name
A name designates an object or an object interface. A name may also provide
access to the object or interface it designates. Such a name implements both
the
Name
interface and the (or a) Java interface of the object
it designates.
encode
public byte[] encode()
throws NamingException
Encodes this name as an array of bytes. This method can be used to send
names over a network, or to store them on disk.
- an encoded form of this name.
NamingException
- if this name can not be encoded (this is the case,
for example, of names that are only valid inside a given Java Virtual
Machine, and that can therefore not be sent over a network or stored
on a disk).
getNamingContext
public NamingContext getNamingContext()
Returns the
NamingContext
that created this name.
In order for a name to implement both the
Name
interface and
the Java interface of the object it designates, the methods of these two
interfaces must have distinct names. To increase the probability of this
case, this method has been named "getNamingContext" instead of
"getContext", since "getNamingContext" is less frequent than "getContext".
- the
NamingContext
that created this name.