public class EBinder extends Object implements NamingContext
Modifier and Type | Class and Description |
---|---|
class |
EBinder.EId
EId is an indentifier representing an event channel of a given type and
relying on a given multicast address and port.
|
Constructor and Description |
---|
EBinder(ChunkFactory chunk_factory,
MarshallerFactory marshaller_factory,
NamingContext context,
StubFactory stub_factory)
Builds a new EBinder instance
|
Modifier and Type | Method and Description |
---|---|
void |
bindConsumer(Session_Low consumer,
EBinder.EId channel)
Binds a new consumer to an event channel
|
Identifier |
decode(byte[] data,
int offset,
int length)
Decode an indentifier (an EId) representing an event channel out of the
supplied array of bytes
|
Identifier |
decode(UnMarshaller u)
Decodes an identifier from the provided unmarshaller.
|
Identifier |
export(Object itf,
org.objectweb.jonathan.apis.kernel.Context hints)
This operation has no meaning in this context: an InternalException is
always thrown.
|
EBinder.EId |
newId(String address,
int port,
String type)
Builds a new identifier representing an event channel of a given type
and relying on a givent multicast address and port
|
public EBinder(ChunkFactory chunk_factory, MarshallerFactory marshaller_factory, NamingContext context, StubFactory stub_factory)
chunk_factory
- the chunk factory that the EBinder will use to
construct messagesmarshaller_factory
- the MarshallerFactory that the EBinder will use
to build messagescontext
- the NamingContext which uses this EBinderstub_factory
- the StubFactory to be used by this EBinderpublic Identifier export(Object itf, org.objectweb.jonathan.apis.kernel.Context hints)
export
in interface NamingContext
itf
- hints
- org.objectweb.jonathan.model.naming_context#export(org.objectweb.jonathan.model.name)
public void bindConsumer(Session_Low consumer, EBinder.EId channel) throws org.objectweb.jonathan.apis.kernel.JonathanException
consumer
- the interface of the consumer object to be added to the
event channelchannel
- the identifier representing the event channelorg.objectweb.jonathan.apis.kernel.JonathanException
- thrown if the bind operation failspublic Identifier decode(byte[] data, int offset, int length) throws org.objectweb.jonathan.apis.kernel.JonathanException
decode
in interface NamingContext
data
- the array of bytes from which to decode the identifieroffset
- the offset in bytes from which to start the decodinglength
- the length in bytes of the portion of the byte array to decodeorg.objectweb.jonathan.apis.kernel.JonathanException
- thrown if the decoding failspublic Identifier decode(UnMarshaller u) throws org.objectweb.jonathan.apis.kernel.JonathanException
decode
in interface NamingContext
u
- an unmarhaller;org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public EBinder.EId newId(String address, int port, String type) throws org.objectweb.jonathan.apis.kernel.JonathanException
address
- the multicast IP address of the event channelport
- the port number of the channeltype
- the type of the channelorg.objectweb.jonathan.apis.kernel.JonathanException
- thrown if the identifier cannot be
constructed with the parameters provided