org.objectweb.naming
Interface NamingContext

All Known Subinterfaces:
Binder

public interface NamingContext

A naming context creates and manages names.


Method Summary
 Name decode(byte[] b)
          Decodes the given encoded name.
 Name export(Object o, Object hints)
          Creates a name in this naming context to designate the given object.
 

Method Detail

export

public Name export(Object o,
                   Object hints)
            throws NamingException
Creates a name in this naming context to designate the given object. The getNamingContext method of the returned name will return this naming context, i.e., nc.export(o, hints).getNamingContext() == nc.

Parameters:
o - the object to be exported. This object may be a name of another naming context.
hints - optional additional information.
Returns:
a name that designates the given object in this naming context.
Throws:
NamingException - if the given object cannot be exported.

decode

public Name decode(byte[] b)
            throws NamingException
Decodes the given encoded name. The getNamingContext method of the returned name will return this naming context, i.e., nc.decode(b).getNamingContext() == nc.

Parameters:
b - an array of byte containing the encoded form of a name created by this naming context.
Returns:
the decoded Name object.
Throws:
NamingException - if the given encoded name cannot be decoded (this is the case, for example, if the given encoded name was not created by this naming context).