|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbandy.event.EventDispatcher
public class EventDispatcher
The EventDispatcher combines every EventSink that absorbs a certain type of
Event. By using the corresponding EventDispatcher, the EventService does not
have to iterate through the list of subscribed sinks, as it can delegate this
task to a suitable dispatcher.
(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.
| Constructor Summary | |
|---|---|
EventDispatcher(java.lang.String eventShortClassName)
|
|
| Method Summary | |
|---|---|
void |
addSink(EventSink eventSink,
EventFilter filter)
Put the event sink and the related event filter under this EventDispatcher's control. |
void |
dispatchEvent(Event event)
Dispatch the given event to all registered event sinks. |
java.lang.String |
getEventShortClassName()
Return the short class name of the event type that is controlled by this EventDispatcher |
void |
informLostSource()
Inform all registered event sinks that the corresponding event source is gone. |
boolean |
isEmpty()
Check whether this EventDispatcher controls any sinks. |
boolean |
removeSink(EventSink eventSink)
Relieve an event sink from this EventDispatcher's control. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventDispatcher(java.lang.String eventShortClassName)
| Method Detail |
|---|
public java.lang.String getEventShortClassName()
public void addSink(EventSink eventSink,
EventFilter filter)
eventSink - Reference to the EventSink to addfilter - Reference to the EventFilter to addpublic boolean removeSink(EventSink eventSink)
eventSink - Reference to the EventSink that shall be released.
public boolean isEmpty()
public void dispatchEvent(Event event)
event - Event to dispatchpublic void informLostSource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||