Another New Dispatcher#1
Draft
ajohnstonTE wants to merge 9 commits into
Draft
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.
It seems to me that this reflection work should be done and cached at startup, rather than on a per-request dispatch.
Owner
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP