org.objectweb.jeremie.binding.echannel
Class EventChannelFactory
- NamingContext, StubFactory
public class EventChannelFactory
implements NamingContext, StubFactory
The EventChannelFactory service allows the construction of EventChannels
providing best-effort unreliable and unordered event dissemination. It
relies on the RTP protocol on top of IP multicast.
void | bindConsumer(Object consumer, EBinder.EId id) - Binds a consumer object to the event channel represented by the given
identifier.
|
Identifier | decode(UnMarshaller u) - Decodes an identifier from the provided unmarshaller.
|
Identifier | decode(byte[] data, int offset, int length) - Decode an indentifier representing an event channel out of the
supplied array of bytes.
|
Identifier | export(Object itf, Context hints) - This operation has no meaning in this context: an InternalException is
always thrown.
|
EventChannel | newEventChannel(String address, int port, String type) - Constructs and returns a new EventChannel
|
Object | newStub(SessionIdentifier ep, Identifier[] ids, Context hints) - Builds a new stub adapted for one-way event generation
|
EventChannelFactory
public EventChannelFactory(ChunkFactory chunk_factory,
MarshallerFactory marshaller_factory)
bindConsumer
public void bindConsumer(Object consumer,
EBinder.EId id)
throws JonathanException
Binds a consumer object to the event channel represented by the given
identifier.
consumer
- the consumer object to add to the channelid
- the identifier of the EventChannel
decode
public Identifier decode(UnMarshaller u)
throws JonathanException
Decodes an identifier from the provided unmarshaller.
u
- an unmarhaller;
- an identifier managed by the target naming context;
decode
public Identifier decode(byte[] data,
int offset,
int length)
throws JonathanException
Decode an indentifier representing an event channel out of the
supplied array of bytes.
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 decode
- an identifier representing the event channel
export
public Identifier export(Object itf,
Context hints)
This operation has no meaning in this context: an InternalException is
always thrown.
itf
- hints
-
- never.
newEventChannel
public EventChannel newEventChannel(String address,
int port,
String type)
throws JonathanException
Constructs and returns a new EventChannel
address
- the IP multicast address to useport
- the port number to usetype
- the type of the EventChannel
- an EventChannel
newStub
public Object newStub(SessionIdentifier ep,
Identifier[] ids,
Context hints)
throws JonathanException
Builds a new stub adapted for one-way event generation
ep
- the protocol SessionIdentifier of the event channelids
- the set of indentifiers for the stubshints
- a String containing the type of the EventChannel
- a stub