org.fishbolt.common.listener.ext
Class EventListener<S,T>

java.lang.Object
  extended by org.fishbolt.common.listener.ext.EventListener<S,T>
Type Parameters:
S - type of changed object.
T - type that describes that change
All Implemented Interfaces:
IEventListener<S,T>

public abstract class EventListener<S,T>
extends java.lang.Object
implements IEventListener<S,T>

An abstract class that gets a set of events as parameters of the IEventListener.eventsPerformed(Collection) method end sends every event as a parameter to the eventPerformed(IEvent) method.


Constructor Summary
EventListener()
           
 
Method Summary
protected abstract  void eventPerformed(IEvent<S,T> event)
          Notifies about the change in system.
 void eventsPerformed(java.util.Collection<IEvent<S,T>> events)
          After the change happened, the system generates the events and notifies the connected listeners calling the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListener

public EventListener()
Method Detail

eventsPerformed

public void eventsPerformed(java.util.Collection<IEvent<S,T>> events)
Description copied from interface: IEventListener
After the change happened, the system generates the events and notifies the connected listeners calling the method.

Specified by:
eventsPerformed in interface IEventListener<S,T>
Parameters:
events - which describes changes in the system.
See Also:
IEvent

eventPerformed

protected abstract void eventPerformed(IEvent<S,T> event)
Notifies about the change in system.

Parameters:
event - describes the change