edu.uci.isr.yancees.client.rmi
Class YanceesRMIClient.SubscriberMediator

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byedu.uci.isr.yancees.server.rmi.AbstractRemoteSubscriberImplementation
                  extended byedu.uci.isr.yancees.client.rmi.YanceesRMIClient.SubscriberMediator
All Implemented Interfaces:
java.rmi.Remote, RemoteSubscriberInterface, java.io.Serializable
Enclosing class:
YanceesRMIClient

public class YanceesRMIClient.SubscriberMediator
extends AbstractRemoteSubscriberImplementation

The subscriber mediator receives notifications from the plug-ins and forward them to their specific subscribers.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
YanceesRMIClient.SubscriberMediator(SubscriberInterface s)
          Constructor
 
Method Summary
 void decReferenceCounter()
           
 int getReferenceCounter()
           
 void incReferenceCounter()
           
 void notify(EventInterface evt)
          Receives notification as RemoteSubscriberInterface and forwards it to the client SubscriberInterface
 void notify(EventInterface[] evtList)
          Receives notification list as RemoteSubscriberInterface and forwards it to the client SubscriberInterface
 void notifyBuffer(EventInterface[] evtList)
          Receives a buffer of single event notifications (not patterns), from the RMI Yancees server.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YanceesRMIClient.SubscriberMediator

public YanceesRMIClient.SubscriberMediator(SubscriberInterface s)
                                    throws java.rmi.RemoteException
Constructor

Parameters:
s - is the subscriber interface to be notified when the plug-in evaluation tree is completed.
Method Detail

notify

public void notify(EventInterface evt)
            throws java.rmi.RemoteException
Receives notification as RemoteSubscriberInterface and forwards it to the client SubscriberInterface

Specified by:
notify in interface RemoteSubscriberInterface
Specified by:
notify in class AbstractRemoteSubscriberImplementation
Parameters:
evt - is the event received from the remote notification service
Throws:
java.rmi.RemoteException - in case of connection errors.

notify

public void notify(EventInterface[] evtList)
            throws java.rmi.RemoteException
Receives notification list as RemoteSubscriberInterface and forwards it to the client SubscriberInterface

Specified by:
notify in interface RemoteSubscriberInterface
Specified by:
notify in class AbstractRemoteSubscriberImplementation
Parameters:
evtList - is the list of events received from the remote notificaiton service
Throws:
java.rmi.RemoteException - in case of connection errors.

incReferenceCounter

public void incReferenceCounter()

decReferenceCounter

public void decReferenceCounter()

getReferenceCounter

public int getReferenceCounter()

notifyBuffer

public void notifyBuffer(EventInterface[] evtList)
                  throws java.rmi.RemoteException
Description copied from class: AbstractRemoteSubscriberImplementation
Receives a buffer of single event notifications (not patterns), from the RMI Yancees server. We need to deserialize them here.

Specified by:
notifyBuffer in interface RemoteSubscriberInterface
Overrides:
notifyBuffer in class AbstractRemoteSubscriberImplementation
Throws:
java.rmi.RemoteException