|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonathan.binding.domain.JDomain
Default domain
implementation.
JDomain implements a domain
functionality . It uses a context
to
associate integers and specific naming context types. For instance, to implement
the OMG naming scheme where 0 is associated with IIOP, if the IIOP implementation
is org.objectweb.david.libs.binders.orbs.iiop.IIOPORB, the bootstrap configuration file
should contain the following lines, in the "/jonathan/JDomain" definition:
The first declaration is used when an identifier is marshalled: JDomain gets the class
name of the identifier's context (in this case
org.objectweb.david.libs.binders.orbs.iiop.IIOPORB), and attempts to get the
corresponding value. The value should be an integer, used to designate the naming context.
The second line is used when an identifier is unmarshalled. JDomain knows the integer id, but may have to dynamically instantiate the corresponding naming context. To do so, the integer must be associated to a factory that may be used to retrieve an instance of the context.
Constructor Summary | |
JDomain(org.objectweb.jonathan.apis.kernel.Context _initial_context)
Builds a new JDomain instance. |
Method Summary | |
NamingContext |
bind(int jid)
Returns the context registered under jid in the target context. |
Identifier |
decode(byte[] data,
int offset,
int len)
Decodes an identifier from a buffer portion. |
Identifier |
decode(UnMarshaller unmarshaller)
Decodes an identifier from the provided unmarshaller. |
void |
export(NamingContext context,
int jid)
Registers the provided context under jid in the
target context. |
Identifier |
export(Object id,
org.objectweb.jonathan.apis.kernel.Context hints)
Creates a new identifier for the object interface designated by the id parameter. |
void |
unexport(int jid)
Unexports the context identified by jid . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDomain(org.objectweb.jonathan.apis.kernel.Context _initial_context)
_initial_context
corresponds to the Context
describing the naming contexts to register implicitly in the new JDomain.
_initial_context
- describing the naming contexts to register
implicitly in the new JDomain.Method Detail |
public final Identifier export(Object id, org.objectweb.jonathan.apis.kernel.Context hints) throws org.objectweb.jonathan.apis.kernel.JonathanException
id must be of type Identifier
export
in interface NamingContext
id
- an identifier managed by another naming context;hints
- additional information (unused);
org.objectweb.jonathan.apis.kernel.JonathanException
- if something else goes wrong.org.objectweb.jonathan.model.naming_context#export(org.objectweb.jonathan.model.name)
public final Identifier decode(byte[] data, int offset, int len)
decode
in interface NamingContext
data
- the byte array to read the encoded identifier from;offset
- offset of the first byte of the encoding;len
- length of the encoding;
public final Identifier decode(UnMarshaller unmarshaller) throws org.objectweb.jonathan.apis.kernel.JonathanException
decode
in interface NamingContext
unmarshaller
- an unmarhaller;
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public final NamingContext bind(int jid)
jid
in the target context.
This method only searched the already instantiated contexts.
jid
- an integer id.
jid
in the target context.public final void export(NamingContext context, int jid) throws ExportException
context
under jid
in the
target context. This may override the settings specified when the JDomain
instance was created.
context
- a naming context;jid
- an integer id;
ExportException
- if the id is already in use.public final void unexport(int jid)
jid
.
jid
- an integer id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |