I want to execute a Jersey method internally (basically, creating a "batch processing framework" where users can pass more than one URI and POST request bundled together and it will try all of them within the same scope). To do so, I need to locate the target method of the request.
I have a path like "/myapi/v2/some/method". Right now,. it's guaranteed not to have any query string parameters or template parameters, and the application is definitely rooted at "/" so it shouldn't be harder than looking at @Path
annotations (although it might have @Valid
annotations meaning I'd have to manually call the validator method somehow... but I can cross that bridge later)
I might be able to hack something together using Reflections, but before I do that, is there a way I could create a ResourceMethod or ResourceMethodInvoker from within a request handler?
Aucun commentaire:
Enregistrer un commentaire