Package com.helix.core.events
Class EventBus
java.lang.Object
com.helix.core.events.EventBus
- All Implemented Interfaces:
AutoCloseable
Thread-safe EventBus supporting synchronous and asynchronous event publishing and type-safe subscriptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidpublish(EngineEvent event) publishAsync(EngineEvent event) voidsubscribe(EventType eventType, EventListener<EngineEvent> listener) voidunsubscribe(EventType eventType, EventListener<EngineEvent> listener)
-
Constructor Details
-
EventBus
public EventBus() -
EventBus
-
-
Method Details
-
subscribe
-
unsubscribe
-
publish
-
publishAsync
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-