org.objectweb.jeremie.binding.echannel
Interface EventChannel

All Superinterfaces:
Remote

public interface EventChannel
extends Remote

An EventChannel is a service that decouples the communication of events between suppliers and consumers of events. It is an intervening object that allows multiple suppliers to communicate with multiple suppliers asynchronously. The event channel itself is both a supplier and consumer of events. This service only offers a push model of communication for both consumers and suppliers of events. Particular implementations of this service will provide specific guarantees in terms of reliability, ordering (and possibly timeliness) of the event communication.


Method Summary
 void addConsumer(Object consumer)
          Add a new consumer to the event channel.
 Object getConsumerProxy()
          Returns a consumer proxy object which can be used by producer to supply events to the channel
 void removeConsumer(Object consumer)
          Remove an existing consumer object from the event channel.
 

Method Detail

addConsumer

void addConsumer(Object consumer)
                 throws org.objectweb.jonathan.apis.kernel.JonathanException
Add a new consumer to the event channel. The consumer object should be of type compatible with that of the event channel

Parameters:
consumer - the consumer object to add
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - thrown if the consumer object cannot be added

removeConsumer

void removeConsumer(Object consumer)
                    throws org.objectweb.jonathan.apis.kernel.JonathanException
Remove an existing consumer object from the event channel. The consumer object specified will no longer receive events from the event channel

Parameters:
consumer - the consumer object to remove
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - thrown of the specified consumer object cannot be removed

getConsumerProxy

Object getConsumerProxy()
                        throws org.objectweb.jonathan.apis.kernel.JonathanException
Returns a consumer proxy object which can be used by producer to supply events to the channel

Returns:
a consumer proxy for the EventChannel
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - thrown if the operation fails