public interface IEventHandler extends IEventProducer
Interface for all event handling classes. Typically, event dispatching is delegated by event producers to implementations of this interface. It accepts registering/unregistering of listeners and also provide a publish method to be called by the producer for dispatching the events.
Modifier and Type | Method and Description |
---|---|
void |
clearAllListeners()
Clear all listeners.
|
int |
getNumListeners() |
void |
publishEvent(Event<?> e)
Dispatch event to all registered listeners
|
registerListener, unregisterListener
void publishEvent(Event<?> e)
e
- event to dispatchint getNumListeners()
void clearAllListeners()