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

java.lang.Object
  |
  +--edu.cmu.cs.able.probebus.siena.SienaProbeEvent
All Implemented Interfaces:
IProbeEvent, ISienaProbeEvent
Direct Known Subclasses:
SienaActivateProbeEvent, SienaDeployProbeEvent, SienaInstallProbeEvent, SienaResponseProbeEvent, SienaSensedProbeEvent, SienaStatusProbeEvent

public abstract class SienaProbeEvent
extends java.lang.Object
implements ISienaProbeEvent

This class acts as a decorator of a (non-Siena) ProbeEvent See "Design Patterns" by Gamma et al for docs on "decorator pattern". Intent is to separate generic, essential probe information (in ProbeEvent) from the Siena bus-specific probe info (in this class). For each subclass of this class there is a corresponding subclass of ProbeEvent.


Field Summary
protected  SienaProbeBus theProbeBus
          The event bus
 
Constructor Summary
SienaProbeEvent(SienaProbeBus pb)
          Constructor for SienaProbeEvent
 
Method Summary
 boolean dispatch()
          Send event on the bus
protected  SienaProbeBus getProbeBus()
          Simple accessor method
abstract  siena.Notification toNotification()
          Convert an event into a Siena Notification
 java.lang.String toString()
          Converts this event to a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.cs.able.probebus.siena.ISienaProbeEvent
createFilter
 
Methods inherited from interface edu.cmu.cs.able.probebus.IProbeEvent
equals
 

Field Detail

theProbeBus

protected SienaProbeBus theProbeBus
The event bus
Constructor Detail

SienaProbeEvent

public SienaProbeEvent(SienaProbeBus pb)
Constructor for SienaProbeEvent
Method Detail

getProbeBus

protected SienaProbeBus getProbeBus()
Simple accessor method

dispatch

public boolean dispatch()
Description copied from interface: IProbeEvent
Send event on the bus
Specified by:
dispatch in interface IProbeEvent
See Also:
IProbeEvent.dispatch()

toNotification

public abstract siena.Notification toNotification()
Description copied from interface: ISienaProbeEvent
Convert an event into a Siena Notification
Specified by:
toNotification in interface ISienaProbeEvent
Returns:
this object represented as a Siena Notification

toString

public java.lang.String toString()
Converts this event to a String
Overrides:
toString in class java.lang.Object