[resteasy-dev] Asynchronous invocation interceptor for client

Michal Szynkiewicz mszynkie at redhat.com
Tue Nov 20 06:30:26 EST 2018


Hi,

We are working on MicroProfile Rest Client 1.1 for SmallRye.
One of the requirements is to implement AsyncInvocationInterceptor, an
interceptor for asynchronous client invocation.
The interceptor has two methods (more details in [1]):

   - prepareContext, executed in the thread that calls the client
   - applyContext, executed in the thread that makes the request.

Moreover, there is a single instance of the interceptor per request (not
per client).

Does RestEasy have some feature that we could use to implement executing
the applyContext method? We couldn't find anything that would work for us
in the JAX-RS itself.

We implemented a wrapper for ExecutorService that decorates runnables with
code that calls the interceptor but we're hoping there may be a better
solution.

Thanks,
Michał



[1]
https://github.com/eclipse/microprofile-rest-client/blob/1.1.X-service/spec/src/main/asciidoc/async.asciidoc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/resteasy-dev/attachments/20181120/06b7e936/attachment.html 


More information about the resteasy-dev mailing list