edu.uci.isr.yancees.server.rmi
Class RemoteYanceesImplementation.SubscriberMediator

java.lang.Object
  extended byedu.uci.isr.yancees.server.rmi.RemoteYanceesImplementation.SubscriberMediator
All Implemented Interfaces:
SubscriberInterface
Enclosing class:
RemoteYanceesImplementation

public class RemoteYanceesImplementation.SubscriberMediator
extends java.lang.Object
implements SubscriberInterface

Performs the mapping between the remote interface and the local subscriber interface, working also as a record of the active subscriptions. We have remote and local subscriberInterfaces to allow the implementation of different protocols, for example HTTP or SOAP, that may heve different ways of representing a remote SubscriberInterface, so we need someone to be a mediator here for the sake of future extensions Behind this façade, yancees interacts only with SubscriberInterfaces whereas, to the outside world, RemoteSubscriberInterfaces are used. Hence, a translation between both is necessary here.


Constructor Summary
RemoteYanceesImplementation.SubscriberMediator(RemoteSubscriberInterface rsi, RemoteYanceesImplementation ryi)
          constructor
 
Method Summary
 int decReferenceCounter()
           
 int incReferenceCounter()
           
 void notify(EventInterface evt)
          Receives notifications from the local components of Yancees and repasses them to the remote subscribers
 void notify(EventInterface[] evtList)
          Receives notifications from the local components of Yancees and repasses them to the remote subscribers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteYanceesImplementation.SubscriberMediator

public RemoteYanceesImplementation.SubscriberMediator(RemoteSubscriberInterface rsi,
                                                      RemoteYanceesImplementation ryi)
constructor

Parameters:
rsi - is the remote interface, that came from the publish or subscribe commands, protocols as well.
Method Detail

notify

public void notify(EventInterface evt)
Receives notifications from the local components of Yancees and repasses them to the remote subscribers

Specified by:
notify in interface SubscriberInterface

notify

public void notify(EventInterface[] evtList)
Receives notifications from the local components of Yancees and repasses them to the remote subscribers

Specified by:
notify in interface SubscriberInterface

incReferenceCounter

public int incReferenceCounter()

decReferenceCounter

public int decReferenceCounter()