Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manually set MessageHandlerMetadata handledMessages field #63

Closed
volgar1x opened this issue Mar 13, 2014 · 2 comments
Closed

manually set MessageHandlerMetadata handledMessages field #63

volgar1x opened this issue Mar 13, 2014 · 2 comments

Comments

@volgar1x
Copy link

Hello again

To enable some annotation aliasing I had to specifically say to a given MessageHandlerMetadata what messages has to be handled through a Reflection workaround.

https://github.com/Blackrush/Rocket/blob/master/network/src/main/java/org/rocket/network/event/mbassador/RocketMetadataReader.java#L66

There is maybe a better way to do it but I cannot find it.

@bennidi
Copy link
Owner

bennidi commented Mar 17, 2014

Currently, the field is private and setting it using Reflection is thus the only way to go. Changing the constructor could provide more flexibility here but I would need to know more details about your specific scenario. What kind of aliasing are you trying to do?

@bennidi
Copy link
Owner

bennidi commented Apr 2, 2014

I changed the way how MessageHandler is constructed. You can now flexibly define all necessary properties in a Map. I think that should solve your problem.

@bennidi bennidi closed this as completed Apr 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants