de.cau.cs.kieler.sim.kiem
Interface IKiemEventListener

All Known Implementing Classes:
DataComponentModelCheck, EventListener, EventListener, KiemEventListener, KiemEventListener

public interface IKiemEventListener

Classes implementing this interface can listen to events happening anywhere in KIEM.

When an event successfully completes somewhere inside the KIEM plugin, the plugin may choose to notify the listeners of this event.

KiemEvent

Rating proposed yellow
(2010-02-03)

Method Summary
 void notifyEvent(KiemEvent event)
          This is the basic notify method that is called by KIEM whenever an event occurs for which this EventListener is registered (see provideEventOfInterest()).
 KiemEvent provideEventOfInterest()
           Return a KiemEvent type (integer value) that represents a number of events this component wants to listen to.
 

Method Detail

notifyEvent

void notifyEvent(KiemEvent event)
This is the basic notify method that is called by KIEM whenever an event occurs for which this EventListener is registered (see provideEventOfInterest()).

Parameters:
event - the KiemEvent with additional attached information, depending on the specific event

provideEventOfInterest

KiemEvent provideEventOfInterest()

Return a KiemEvent type (integer value) that represents a number of events this component wants to listen to.

A KiemEvent can be a combination of several events. The simplest way to register for two events that e.g., indicate a step-command and the removal of the component is to have the following code:

public KiemEvent provideEventOfInterest() {
int[] events = {CMD_STEP, DELETED}
return new KiemEvent(events);
}

Returns:
the KiemEvent type indicating the events of interest