-
Notifications
You must be signed in to change notification settings - Fork 20
EventStrategy
Fabio Ticconi edited this page Jul 30, 2016
·
4 revisions
If you want to change the eventbus behavior there are some options.
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.
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.