org.objectweb.jonathan.binding.api
Interface NamingContext

All Known Implementing Classes:
EBinder, JDomain, MinimalAdapter, SingleOAdapter

public interface NamingContext

NamingContext is a specific sort of naming context used to create and manage names of type Identifier.

There is no generic export method defined on NamingContext, and the resolve method is defined on Identifier.


Method Summary
 Identifier decode(byte[] data, int offset, int length)
          Decodes an identifier from a buffer portion.
 Identifier decode(UnMarshaller u)
          Decodes an identifier from the provided unmarshaller.
 Identifier export(Object itf, org.objectweb.jonathan.apis.kernel.Context hints)
          Creates a new identifier for the object interface designated by the itf parameter.
 

Method Detail

export

Identifier export(Object itf,
                  org.objectweb.jonathan.apis.kernel.Context hints)
                  throws ExportException,
                         org.objectweb.jonathan.apis.kernel.JonathanException
Creates a new identifier for the object interface designated by the itf parameter. Note that calling the resolve method on the returned identifier should return tt>id.

Parameters:
itf - an interface reference
hints - additional information;
Returns:
an identifier managed by the target naming context.
Throws:
ExportException - if an error occurs in the export process;
org.objectweb.jonathan.apis.kernel.JonathanException - if something else goes wrong.
See Also:
org.objectweb.jonathan.model.naming_context#export(org.objectweb.jonathan.model.name)

decode

Identifier decode(byte[] data,
                  int offset,
                  int length)
                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Decodes an identifier from a buffer portion.

Since identifiers are likely to be transmitted on the net, they may have to be encoded and decoded. The encoding method is borne by the Identifier interface, but the decoding methods must be borne by each naming context. This method creates an identifier (associated with the target naming context), from the length bytes of data starting at offset offset.

Parameters:
data - the byte array to read the encoded identifier from;
offset - offset of the first byte of the encoding;
length - length of the encoding;
Returns:
a decoded identifier;
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.

decode

Identifier decode(UnMarshaller u)
                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Decodes an identifier from the provided unmarshaller.

Parameters:
u - an unmarhaller;
Returns:
an identifier managed by the target naming context;
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.