Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Explicit EventHandler creation avoiding reflection #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Explicit EventHandler creation avoiding reflection #121

wants to merge 2 commits into from

Conversation

ggalmazor
Copy link

The motivation behind this changes is to be able to create and register new event listeners in run-time, instead of depending on annotation reflection.

The original API for Bus instances is intact and all tests are passing.

This changes have been testes in the sample project and in a sandbox project loading Otto as a Maven dependency.

Commit message:
New register & unregister methods in Bus for explicit (not by reflection) EventHandler definition
Added a generic Callback interface to be extended (implemented) by third parties
Added a specific implementation of MethodCallingCallback with the original implementation of an EventHandler created by reflection of @subscribe annotations in objects
Added tests to cover added features
Added example of explicit registration&un-registration of Callbacks in sample project

New register & unregister methods in Bus for explicit (not by reflection) EventHandler definition
Added a generic Callback interface to be extended (implemented) by third parties
Added a specific implementation of MethodCallingCallback with the orginal implementation of an EventHandler created by reflection of @subscribe annotations in objects
Added tests to cover added features
Added example of explicir registration&un-registration of Callbacks in sample project
@ggalmazor
Copy link
Author

I'm realizing that I've changed the minor version number... I can rollback that change if needed. Apologies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant