Skip to content
Daan van Yperen edited this page Aug 2, 2014 · 4 revisions

Customizing the eventbus

Overriding event dispatching

If you need better performance, asynchronous events or otherwise, you can implement your own version of EventDispatchStrategy. Add it to your EventManager'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 EventManager constructor.