org.openbandy.event
Interface EventSink

All Known Implementing Classes:
EventServiceTest

public interface EventSink

The EventSink interface defines the methods a class must implement in order to absorb events of a given type.

(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.0
Author:
Philipp Bolliger (philipp@bolliger.name)

Method Summary
 void absorb(Event event)
          This method is called by the EventService whenever it has an event this sink subscribed for.
 java.util.Vector getAbsorbedEventTypes()
          While subscribing at the EventService, the latter will request the EventSink to state the types of Events it will absorb.
 void lostEventSource(java.lang.String eventShortClassName)
          Using this callback, the EventService will inform subscribed sinks about the loss of the EventSource that formerly generated Events of type eventShortClassName.
 

Method Detail

getAbsorbedEventTypes

java.util.Vector getAbsorbedEventTypes()
While subscribing at the EventService, the latter will request the EventSink to state the types of Events it will absorb.

Returns:
A Vector of Strings containing the short class names of the Events.

absorb

void absorb(Event event)
This method is called by the EventService whenever it has an event this sink subscribed for.

Parameters:
event - The Event that was forwarded to the sink.

lostEventSource

void lostEventSource(java.lang.String eventShortClassName)
Using this callback, the EventService will inform subscribed sinks about the loss of the EventSource that formerly generated Events of type eventShortClassName.

Parameters:
eventShortClassName - The short class name of the Event that will not be generated no more.