edu.cmu.cs.able.probebus.siena
Class SienaProbeAdapter

java.lang.Object
  |
  +--edu.cmu.cs.able.probebus.siena.SienaProbeAdapter
All Implemented Interfaces:
siena.Notifiable

public class SienaProbeAdapter
extends java.lang.Object
implements siena.Notifiable

George Fairbanks 19 Nov 01 This class follows the Adapter pattern from _Design Patterns_ by Gamma et al. A consumer of probe events needs to be notified when an interesting event is posted. However, it can't directly subscribe to Siena notifications and stay Siena unaware. So, this adapter receives the Siena notification and turns it into a generic, non-Siena event (IProbeEvent).


Field Summary
protected  IProbeConsumer consumer
           
 
Constructor Summary
SienaProbeAdapter(IProbeConsumer c)
          Constructor for SienaProbeAdapter
 
Method Summary
 void notify(siena.Notification n)
          This is the callback method that Siena invokes.
 void notify(siena.Notification[] e)
          Same as simple notify except with multiple Notification events
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumer

protected IProbeConsumer consumer
Constructor Detail

SienaProbeAdapter

public SienaProbeAdapter(IProbeConsumer c)
Constructor for SienaProbeAdapter
Method Detail

notify

public void notify(siena.Notification n)
This is the callback method that Siena invokes. Our job is to remove Siena-specific info and forward a non-Siena event (IProbeEvent) to the consumer
Specified by:
notify in interface siena.Notifiable

notify

public void notify(siena.Notification[] e)
Same as simple notify except with multiple Notification events
Specified by:
notify in interface siena.Notifiable