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

Use a functional approach #70

Open
aesteve opened this issue Feb 7, 2017 · 0 comments
Open

Use a functional approach #70

aesteve opened this issue Feb 7, 2017 · 0 comments
Assignees
Milestone

Comments

@aesteve
Copy link
Owner

aesteve commented Feb 7, 2017

To open the door to this proposal, start a proof of concept within Nubes to map any @FunctionalInterface as a  Handler with "magic" parameter injection.

Cannot be achieved as is since lambdas are not "methods" (when introspected at runtime).

Maybe compilation processing could be involved so that if a "resolving class" is annotated properly, then the code to create a Handler from it is automatically generated.

That'd be great to introduce type safety i.e. : you're trying to use a BiConsumer<String, Foo> as a Handler<RoutingContext> but I don't know how to map Foo from the RoutingContext.

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

No branches or pull requests

1 participant