Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Simplify dispatching of sync/async handlers #29

Merged
merged 1 commit into from
Apr 1, 2016

Conversation

purple52
Copy link
Contributor

@purple52 purple52 commented Apr 1, 2016

Model asynchronous handler methods as returning Void to reduce the complexity of the handler registry.

@matt-rich matt-rich self-assigned this Apr 1, 2016

final Class<?> paramClass = method.getParameterTypes()[0];
if (paramClass != Envelope.class) {
throw new IllegalArgumentException("Handler methods must receive Envelope as an argument");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth giving he value of paramClass in the exception message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - will add this.

@matt-rich matt-rich merged commit bbd10a3 into master Apr 1, 2016
@matt-rich matt-rich deleted the refactor-dispatcher branch April 1, 2016 16:05
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.

None yet

2 participants