|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Identifier
An identifier uniquely identifies an applicative object interface in a given
naming context
. It is a specific kind of
name
.
Method Summary | |
---|---|
Object |
bind(Identifier[] ref,
org.objectweb.jonathan.apis.kernel.Context hints)
The bind operation returns an object giving access to the object interface referenced by the target identifier. |
byte[] |
encode()
Encodes the target identifier in an array of bytes. |
void |
encode(Marshaller m)
Encodes the target identifier in a marshaller. |
NamingContext |
getContext()
Returns the naming context associated with the target identifier. |
boolean |
isValid()
Tests the validity of the target identifier. |
Object |
resolve()
Returns the next name in the referencing chain. |
void |
unexport()
Unexporting an identifier means that the target identifier no longer designates the object interface it was created for (by some export method). |
Method Detail |
---|
NamingContext getContext()
Object bind(Identifier[] ref, org.objectweb.jonathan.apis.kernel.Context hints) throws ForwardException, BindException, org.objectweb.jonathan.apis.kernel.JonathanException
The returned object may be a direct reference to the object interface that was used to create the identifier (at export-time), or it may be a surrogate (a proxy) for that object interface.
If this operation is implemented, it means that the related naming context
is not only a
naming context
but
also a binder
.
This operation may in particular raise two types of exceptions:
ForwardExceptions
that indicate that the
"real" target object interface should be bound using the
reference
contained in the exception. Note that in this case, calling the
resolve
method should return the same reference.
This facility may be used to handle mobility.
BindExceptions
that indicate that an error
occurred in the binding process;
All parameters are optional (they may be null).
ref
- a set of identifiers of the seeked object interface;hints
- a context containing extra information that may be useful;
ForwardException
- if the target has moved;
BindException
- if an error occurs in the binding process;
org.objectweb.jonathan.apis.kernel.JonathanException
- if something else goes wrong.org.objectweb.jonathan.model.binder#bind(org.objectweb.jonathan.model.name)
void unexport()
boolean isValid()
bind
or resolve
will
fail. If so, the target identifier must no longer be used.
bind
or
resolve
certainly fail.Object resolve()
If the naming context that has built the target identifier is an intermediate naming context, this method should return the next "name" in the referencing chain, or null if no such name can be found or created.
Such a name may be of type Identifier
,
Reference
, or of any other type, provided that it really
designates the right interface, and that its type is clear from the context.
org.objectweb.jonathan.model.naming_context#resolve(org.objectweb.jonathan.model.name)
byte[] encode() throws org.objectweb.jonathan.apis.kernel.JonathanException
Since identifiers are likely to be transmitted on the net, they may have to be
encoded and decoded. The corresponding
decoding
method is borne
by the NamingContext
interface.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.void encode(Marshaller m) throws org.objectweb.jonathan.apis.kernel.JonathanException
the
- marshaller to be used for encoding.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |