Class EventBus
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.api.event.EventBus
-
public class EventBus extends java.lang.Object
Static wrapper for the event bus (IEventBus implementation). Allows any class to subscribe and publish events to the bus
-
-
Constructor Summary
Constructors Constructor Description EventBus()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
publishEvent(IEvent event)
Publish an event to the busstatic void
registerEventSubscriber(java.lang.Object subscriber)
Attempts to register an object as an event subscriber, all methods with @EventHandler annotation will be registered
-
-
-
Method Detail
-
publishEvent
public static void publishEvent(IEvent event)
Publish an event to the bus- Parameters:
event
- to publish
-
registerEventSubscriber
public static void registerEventSubscriber(java.lang.Object subscriber)
Attempts to register an object as an event subscriber, all methods with @EventHandler annotation will be registered- Parameters:
subscriber
- instance of a class to register
-
-