eclipse / microprofile-rest-client

MicroProfile Rest Client
Apache License 2.0
141 stars 71 forks source link

Revisit org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor #202

Open rmannibucau opened 5 years ago

rmannibucau commented 5 years ago

Hello everyone,

I just discovered org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor and have to admit I don't understand at all that API.

There are two main remarks about it:

  1. if you intend to make libraries/user code enable to use that multi-phase API then all but last step should be able to return a context so API would rather be:

    public interface AsyncInvocationInterceptor { A prepareContext(); A applyContext(); void removeContext(); }

otherwise the user/library must relies on some custom thread factory passed to the executor of the client which leads to my second point

  1. This API is already there in JAX-RS through the executor passed to the Client, it enables any user to wrap client Runnable and therefore gets exactly the same kind of hook so IMHO this API just brings noise to plain JAX-RS but no feature.

Any option to deprecate it to drop it next year?

Romain

jamezp commented 6 months ago

Is this still an issue?

rmannibucau commented 6 months ago

Im dont have any MP app anymore so guess there is no point fixing it from my side.