org.activemath.events.impl
Class EventSubscriber
java.lang.Object
org.activemath.events.impl.EventSubscriber
- All Implemented Interfaces:
- EventListener, ActivemathEventListener
public class EventSubscriber
- extends Object
- implements ActivemathEventListener
Represents an event subscriber.
A subscriber has:
- a listener (identifying the subscriber)
- a multicaster with an event queue
- an include and exclude filter list for events
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.
|
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 |
EventSubscriber
public EventSubscriber(ActivemathEventListener listener,
EventFilterList includeList,
EventFilterList excludeList)
- Create a new subscriber for a listener.
stop
public void stop()
onActivemathEvent
public 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).
- Specified by:
onActivemathEvent in interface ActivemathEventListener
- Parameters:
event - the event to respond to