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:
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:
otherwise the user/library must relies on some custom thread factory passed to the executor of the client which leads to my second point
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.
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:
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
Any option to deprecate it to drop it next year?
Romain