-
Notifications
You must be signed in to change notification settings - Fork 20
EventStrategy
Daan van Yperen edited this page Aug 2, 2014
·
4 revisions
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.
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.