public class EventBus
extends java.lang.Object
| Constructor and Description |
|---|
EventBus() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(Listener l)
Add a listener to the EventBus
|
static boolean |
isListenerPresent(Listener l)
Test if a given listener is currently registered with the EventBus
|
static void |
publish(Event e)
Publish an event which will be broadcast to all listeners
|
static void |
removeAllListeners()
Remove all listeners from the EventBus, returning it to its initial state
|
static void |
removeListener(Listener l)
Remove a listener from the EventBus
|
public static void publish(Event e)
e - the event to publishpublic static void addListener(Listener l)
l - the listener to addpublic static void removeListener(Listener l)
l - the listener to remove. It is safe to remove a listener not currently added.public static void removeAllListeners()
public static boolean isListenerPresent(Listener l)
l - the listener to test for