SimpleEventBus

A minimal, deterministic, in-memory event bus.

Design note

  • Uses type-exact subscriptions (no class hierarchy walking) to avoid surprising dispatch costs.

  • Is synchronous: event dispatch happens on the calling thread.

  • Thread-safe subscription/unsubscription for typical plugin usage.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun <E : Event> post(event: E): E
Link copied to clipboard
open fun <E : Event> subscribe(type: Class<E>, listener: EventListener<E>): EventSubscription
open fun <E : Event> subscribe(type: Class<E>, priority: EventPriority, listener: EventListener<E>): EventSubscription
open override fun <E : Event> subscribe(type: Class<E>, listener: EventListener<E>, priority: EventPriority, ignoreCancelled: Boolean): EventSubscription