org.activemath.events.impl
Class EventSubscriber

java.lang.Object
  extended by org.activemath.events.impl.EventSubscriber
All Implemented Interfaces:
EventListener, ActivemathEventListener

public class EventSubscriber
extends Object
implements ActivemathEventListener

Represents an event subscriber. A subscriber has:

Events send to subscriber are forwared to the multicaster if they match any entry in the include list and do not match an entry in the exclude list.


Constructor Summary
EventSubscriber(ActivemathEventListener listener, EventFilterList includeList, EventFilterList excludeList)
          Create a new subscriber for a listener.
 
Method Summary
 void onActivemathEvent(ActivemathEvent event)
          Deliver an event to the subscriber, iff it matches any filter in the include list (or include list is empty), and it matches no filter in the exclude list (or exclude list is empty).
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventSubscriber

public EventSubscriber(ActivemathEventListener listener,
                       EventFilterList includeList,
                       EventFilterList excludeList)
Create a new subscriber for a listener.

Method Detail

stop

public void stop()

onActivemathEvent

public void onActivemathEvent(ActivemathEvent event)
Deliver an event to the subscriber, iff

Specified by:
onActivemathEvent in interface ActivemathEventListener
Parameters:
event - the event to respond to