Event Manager
Internal implementation of the Bus interface responsible for:
Discovering and registering event handler methods (
@EventHandler),Discovering and registering exception handler methods (
@ExceptionHandler),Managing instance subscribers through weak references,
Managing static subscribers registered by class,
Dispatching events with respect to handler priority, cancellation and polymorphic event-type matching,
Routing exceptions to matching exception handlers,
Caching resolved handler lists for efficient repeated dispatch.
This class is not exposed publicly; callers obtain a bus instance via Bus.invoke rather than referencing this implementation directly.
Types
Properties
Maps each event type to its registered handler list.
Maps each event type to its registered exception handlers.
Cache of fully resolved exception handler lists for each event class.
Tracks which event types each subscriber object handles.
Tracks which event types each subscriber object has exception handlers for.
Cache of fully resolved handler lists for each event class.
Tracks which event types each static subscriber class handles.
Tracks which event types each static subscriber class has exception handlers for.
Functions
Dispatches a throwable raised by an event handler to registered @ExceptionHandler methods.
Registers a class containing static handler methods.
Registers all static handler methods declared on the reified type T.
Unregisters an object from the bus.
Unregisters all static handlers declared for the given Kotlin class.
Unregisters all static handlers declared for the given class.
Unregisters all static handler methods declared on the reified type T.