edu.uci.isr.yancees.server
Class SubscriptionFacade

java.lang.Object
  extended byedu.uci.isr.yancees.server.AdministrationFacade
      extended byedu.uci.isr.yancees.server.SubscriptionFacade

public class SubscriptionFacade
extends AdministrationFacade

This is the sever-side subscriber façade for publishing and subscribing. It performs all necessary operations with both notification and subscripton managers. It also invokes the appropriate output filters if they are installed This class stays behind the YanceesServer class


Nested Class Summary
 class SubscriptionFacade.SubscriberMediator
          The subscriber mediator receives notifications from the plug-ins and forward them to their specific subscribers.
 
Field Summary
protected  boolean filtersInstalled
           
 
Method Summary
protected static SubscriptionFacade getInstance()
           
protected  void installOutputFilters(FilterManagerInterface filterMan)
          Installs the inputqueue managed by filterManager in this API
protected  void setNotificationManger(NotificationManager nm)
          Used by the Yancees Server API
protected  void setSubscriptionManager(SubscriptionManager sm)
          Used by the Yancees API
 void subscribe(MessageInterface msg, SubscriberInterface si)
          look for the tag on the message extract the and subtrees parse the and extract the plug-in evaluation tree parse the part if any.
 void unsubscribe(SubscriberInterface si)
          Removes all the subscriptions associated to the provided subscriber
 void unsubscribe(SubscriberInterface si, MessageInterface sub)
          Removes all the subscriptions associated to the provided subscriber
 
Methods inherited from class edu.uci.isr.yancees.server.AdministrationFacade
resumeYancees, shutdownYancess, suspendYancees
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filtersInstalled

protected boolean filtersInstalled
Method Detail

getInstance

protected static SubscriptionFacade getInstance()

installOutputFilters

protected void installOutputFilters(FilterManagerInterface filterMan)
Installs the inputqueue managed by filterManager in this API


subscribe

public void subscribe(MessageInterface msg,
                      SubscriberInterface si)
               throws YanceesException
look for the tag on the message extract the and subtrees parse the and extract the plug-in evaluation tree parse the part if any. If it does not exist, the default notificatoin policy is used. When parsing the notificaton, inform the parsed tree so the NotificationManager can connect it to its selected policy.

Parameters:
msg - is a message having and optional part.
si - is a callback interface of the subscriber.
Throws:
YanceesException

unsubscribe

public void unsubscribe(SubscriberInterface si)
                 throws YanceesException
Removes all the subscriptions associated to the provided subscriber

Parameters:
si - the callbabk interface of the subscriber
Throws:
YanceesException - in case there is no subscriptions associated to this subscriber

unsubscribe

public void unsubscribe(SubscriberInterface si,
                        MessageInterface sub)
                 throws YanceesException
Removes all the subscriptions associated to the provided subscriber

Parameters:
si - the callbabk interface of the subscriber
sub - the specifi subscription to be descontinued
Throws:
YanceesException - in case there is no subscriptions associated to this subscriber

setNotificationManger

protected void setNotificationManger(NotificationManager nm)
Used by the Yancees Server API

Parameters:
nm - the NotificatoinManager instance to be used.

setSubscriptionManager

protected void setSubscriptionManager(SubscriptionManager sm)
Used by the Yancees API