[resteasy-dev] How to make (java) method available from ClientRequestContext?

Michal Szynkiewicz mszynkie at redhat.com
Fri Dec 14 09:32:37 EST 2018


Hi,

MicroProfile Rest Client 1.2 requires that the method that is handling the
request is available under a specific key in the ClientRequestContext [1].

I've been struggling to find an elegant way of implementing it in SmallRye.
Currently, I have it working with a filter and digging out the
ClientInvocation from ClientRequestContextImpl [2] but would rather not use
reflection for that.

Could you give me some tip how to implement it better, if possible?

Thanks,
Michał

[1]
https://github.com/eclipse/microprofile-rest-client/blob/857ce67949a1e84600e5ffa2dfc80571465aa31a/tck/src/main/java/org/eclipse/microprofile/rest/client/tck/providers/InvokedMethodRequestFilter.java#L36

[2]
https://github.com/michalszynkiewicz/smallrye-rest-client/blob/99e05e97932e5b53bb4161594950c3ef7dba9a2d/implementation/src/main/java/io/smallrye/restclient/MethodInjectionFilter.java#L34-L49
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/resteasy-dev/attachments/20181214/1645d557/attachment.html 


More information about the resteasy-dev mailing list