Commit Graph

13 Commits

Author SHA1 Message Date
ee688929fd Add callback event handling
The EventHandler class has been converted to an interface, with the
reflection specific part being moved to the new ReflectiveEventHandler
class. Callback event handlers implement the same interface through the
CallbackEventHandler class.

The event handlers are defined in the new handler package, which is not
exported by the eventbus.core module.
2021-11-02 19:33:18 +01:00
b760c58298 Add a handler execution order debugging method 2021-11-01 21:36:24 +01:00
74447dea59 Add nested dispatch test
The test performs a nested event dispatch then cancels the dispatch. If
Both operations are successful, the test is successful.

Currently, the test fails, but should be successful once the nested
dispatch bug is fixed.
2021-07-12 10:17:46 +02:00
2ec0a82a96 Respect listener-level properties 2021-03-14 11:18:11 +01:00
6a2cad4ae5 Add ExceptionEvent
An exception event wraps an event that caused an exception inside of an
event handler while being dispatched and is then dispatched to dedicated
handlers.
2021-02-21 10:36:06 +01:00
b2fe3a9d6c Log unhandled dead events 2021-02-20 22:10:48 +01:00
0036dc4829 Add DeadEvent
A dead events wraps an event that was dispatched but not delivered to
any handler. The dead event is than dispatched to dedicated handlers.
2021-02-19 16:05:11 +01:00
002180ed3b Remove EventListener and IEvent marker interfaces
This allows Event Bus to interface with existing classes without
modification.
2021-02-15 20:36:09 +01:00
cd2e7ad023 Rename Event#eventType to Event#value for more concise usage 2021-02-15 13:42:20 +01:00
9b1c708514 Replace priority with @Priority
The new @Priority annotation serves the exact same purpose as
@Event(priority = ...), but should be easier to read in complex handler
declarations. It has to be used in conjunction with the @Event
annotation, not instead of it.
2021-02-15 12:06:33 +01:00
3a6ebe9a19 Replace includeSubtypes with @Polymorphic
The new @Polymorphic annotation serves the exact same purpose as
@Event(includeSubtypes = true), but should be easier to read in complex
handler declarations. It has to be used in conjunction with the @Event
annotation, not instead of it.
2021-02-15 10:55:30 +01:00
fd255d65cc Rename event-bus module to event-bus-core, add event-bus-ap module
event-bus is now a parent project containing the two modules
event-bus-core (the previous event-bus) and event-bus-ap (annotation
processor).

The version of the parent project (and thus that of the modules) has
been bumped to 1.0.0, as this change breaks compatibility with previous
versions due to the different artifact, module and package names.
2021-02-09 09:52:26 +01:00
9701e862df Add parent project, convert existing project to Maven module 2021-02-08 19:30:37 +01:00