Skip to content
Fabio Ticconi edited this page Jul 30, 2016 · 4 revisions

Customizing the eventbus

If you want to change the eventbus behavior there are some options.

Overriding event dispatching

If you need better performance, asynchronous events or otherwise, you can implement your own version of EventDispatchStrategy. Add it to your EventSystem's constructor to override listener registration and event dispatching.

Be mindful that artemis-odb supports multiple world instances at the same time, so the strategy should generally support this.

Overriding listener finding

The default strategy looks for @Subscribe annotations on your listener methods. If you want to resolve your listeners differently, for example by matching method prefixes, implement your own ListenerFinderStrategy and register it via the EventSystem constructor.