-
Notifications
You must be signed in to change notification settings - Fork 0
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
Another New Dispatcher #1
base: move-legacy-dispatching
Are you sure you want to change the base?
Conversation
A lot of this will be removed eventually. Committing it just makes it easier to distinguish from any new functionality and some near-future refactors while doing dev.
Object instance = matchInfo.endpoint.resource.getInstance(); | ||
Class<?> instanceClass = matchInfo.endpoint.resource.getInstanceClass(); | ||
Class<?>[] parameterTypes = method.getParameterTypes(); | ||
Annotation[][] parameterAnnotations = method.getParameterAnnotations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this reflection work should be done and cached at startup, rather than on a per-request dispatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a TODO in here somewhere for exactly that. Atm I'm just focusing on matching the spec so I have a better idea of how to structure a lot of this. It entirely possible I'll get to that caching earlier than I expect, but I'm planning on doing that once the structure is less likely to be heavily refactored (which is definitely going to happen before this dispatcher is done).
Also MediaTypeData now works much more like MediaType, except lazily in one implementation.
…but passing) tests This should help with designing more complicated tests and work as a reference implementation for the performant version. There's also a dispatching test that is added because I was feeling optimistic, but really it's too high level. The endpoint registry test does a better job of testing the target functionality more precisely. I'll likely remove the dispatching test at some point.
WIP