|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonathan.libs.binding.echannel.EBinder.EId
EId is an indentifier representing an event channel of a given type and relying on a given multicast address and port.
Identifier
Constructor Summary | |
EBinder.EId(byte[] encoded,
int offset,
int length)
Builds a new EId representing an event channel by decoding the information supplied in a byte array |
|
EBinder.EId(java.lang.String address,
int port,
java.lang.String type)
Builds a new EId representing an event channel of a given type relying on a given multicast address and port |
|
EBinder.EId(UnMarshaller unmarshaller)
Builds a new EId representing an event channel by decoding the information supplied in an unmarshaller. |
Method Summary | |
java.lang.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 marshaller)
Encodes the target identifier in a marshaller. |
NamingContext |
getContext()
Returns the naming context associated with the target identifier. |
ProtocolGraph |
getProtocolGraph()
Returns a session identifier for the event channel represented by this EId |
SessionIdentifier |
getSessionIdentifier()
Returns a session identifier for the event channel represented by this EId |
boolean |
isValid()
Tests the validity of the target identifier. |
java.lang.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). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EBinder.EId(java.lang.String address, int port, java.lang.String type)
address
- the IP multicast address to be used by the channelport
- the port number to be used by the channeltype
- the type of the channelpublic EBinder.EId(byte[] encoded, int offset, int length) throws org.objectweb.jonathan.apis.kernel.JonathanException
encoded
- the byte array containing the marshalled EIdoffset
- the offset in bytes from which to start the decodinglength
- the length in bytes of the portion of the byte array to
decode
org.objectweb.jonathan.apis.kernel.JonathanException
- thrown if the unmarshalling failspublic EBinder.EId(UnMarshaller unmarshaller) throws org.objectweb.jonathan.apis.kernel.JonathanException
unmarshaller
- an unmarshaller.
org.objectweb.jonathan.apis.kernel.JonathanException
- thrown if the unmarshalling failsMethod Detail |
public SessionIdentifier getSessionIdentifier() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- thrown if a session identifier cannot be
createdpublic ProtocolGraph getProtocolGraph() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- thrown if a session identifier cannot be
createdpublic java.lang.Object bind(Identifier[] ref, org.objectweb.jonathan.apis.kernel.Context hints) throws org.objectweb.jonathan.apis.kernel.JonathanException
Identifier
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).
bind
in interface Identifier
ref
- a set of identifiers of the seeked object interface;hints
- a context containing extra information that may be useful;
org.objectweb.jonathan.apis.kernel.JonathanException
- if something else goes wrong.binder.bind(org.objectweb.jonathan.model.name)
public NamingContext getContext()
Identifier
getContext
in interface Identifier
public byte[] encode() throws org.objectweb.jonathan.apis.kernel.JonathanException
Identifier
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.
encode
in interface Identifier
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public void encode(Marshaller marshaller) throws org.objectweb.jonathan.apis.kernel.JonathanException
Identifier
encode
in interface Identifier
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public java.lang.Object resolve()
Identifier
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.
resolve
in interface Identifier
naming_context.resolve(org.objectweb.jonathan.model.name)
public boolean isValid()
Identifier
bind
or resolve
will
fail. If so, the target identifier must no longer be used.
isValid
in interface Identifier
bind
or
resolve
certainly fail.public void unexport()
Identifier
unexport
in interface Identifier
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |