users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Interceptor Invocation and CDI

From: Markus KARG <markus_at_headcrashing.eu>
Date: Wed, 24 Oct 2012 18:38:39 +0200

> > However, I still fail to see what interceptors can do that filers
> can't. Why do we need them?
>
> Here are some of the differences:
>
> (i) Clearly they are in different extension points in the pipeline
> (ii) Interceptors are wrapping and can access the entity in marshalled
> and unmarshalled forms
> (iii) ReaderInterceptors, just like MBRs, are called only if needed
> (based on application logic, for example, when Response.getEntity() is
> called on the client)
>
> In a nutshell, they are there to extend/modify the functionality of
> MBRs and MBWs.

Santiago, we really do not want to bother, but still this does not explain
why we *need* them (from the view of a user of the API). Can you please
provide one real-world use case that makes Jan and me understand why it
cannot be solved with a filter? Maybe Jan and me are just too dimwitted to
understand why users cannot just live with filters but must have
interceptors in addition. Sorry for being persistent with this, but we think
it would be good if we really understand the driving *need* behind this, nut
just the technical merits (which we think to have understood already).

Thanks
Markus