public class EventDispatcher extends Object
Constructor and Description |
---|
EventDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(Class<?> eventClass,
EventListener eventListener)
Add an
EventListener . |
void |
clearQueue()
Clear the event queue
|
Set<Class<?>> |
getEventClasses()
Get all the
Event classes that currently have listeners. |
boolean |
processQueue()
Processes the next event in the event queue.
|
void |
queueEvent(Event event)
Queues the
Event |
void |
removeAllEventListeners()
Remove all the
EventListener s |
void |
removeEventListener(Class<?> eventClass,
EventListener eventListener)
Removes an
EventListener |
<E extends Event> |
sendNow(E event)
Sends the supplied event now, bypassing the queue.
|
public void clearQueue()
public boolean processQueue()
public <E extends Event> void sendNow(E event)
event
- public void addEventListener(Class<?> eventClass, EventListener eventListener)
EventListener
.eventClass
- eventListener
- public void removeEventListener(Class<?> eventClass, EventListener eventListener)
EventListener
eventClass
- eventListener
- public void removeAllEventListeners()
EventListener
sCopyright © 2010–2015. All rights reserved.