| uk.ac.imperial.presage2.core.event.EventBus |
Class Overview
The EventBus manages the distribution of events to EventListeners who
listen for them. Any object may subscribe(Object) and
unsubscribe(Object) to the eventbus. Upon subscription any methods
annotated with EventListener and containing one argument whose type
implements Event will be registered. These methods will then be
invoked should any object call publish with an event whose type matches that
of the event listener's method's argument.
Public Methods
public
abstract
void
publish
(Event event)
public
abstract
void
subscribe
(Object listener)
public
abstract
void
unsubscribe
(Object listener)