public class EventBus extends Object
EventBus
for passing Event
s. Objects can register and fire events.
Handlermethods annotated with EventListener
will be used.Modifier and Type | Class and Description |
---|---|
protected static class |
EventBus.Listener |
Constructor and Description |
---|
EventBus(Class<?> cls) |
EventBus(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
addListener(Object listener,
Method handler,
Class<?> eventType) |
boolean |
equals(Object obj) |
void |
fire(Event<?> event)
Fire an event.
|
String |
getName() |
int |
hashCode() |
void |
register(Object listener) |
String |
toString() |
void |
unregister(Object listener) |
public String getName()
public void register(Object listener)
public void unregister(Object listener)
public void fire(Event<?> event)
event
- Fired eventCopyright © 2017. All rights reserved.