users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Re: Re: New to the group - comments on the current draft

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Tue, 20 Dec 2011 08:06:31 -0500

On Dec 19, 2011, at 7:03 PM, Sastry Malladi wrote:

> On Dec 14, 2011, at 1:00 PM, Marek Potociar wrote:
>
> > On 12/14/2011 05:34 PM, Santiago Pericas-Geertsen wrote:
> >>
> >> On Dec 12, 2011, at 10:06 AM, Bill Burke wrote:
> >>
> >>>
> >>>
> >>> On 12/12/11 12:17 PM, Santiago Pericas-Geertsen wrote:
> >>>> Handlers were called interceptors at first, which was also confusing. We
> >>>> are still trying to find a better name for them. Something with the word
> >>>> "entity" would help. Not sure about "entity filters", somehow I like
> >>>> "entity handlers" better :)
> >>>>
> >>>
> >>> MarshallingFilter
> >>> MarshallingInterceptor
> >>
> >> Possibly, but I think this makes it hard to connect to other JAX-RS 1.X types (we use the terms reader and writer rather than unmarshaller and marshaller).
> >>
> >> I think the most accurate phrase is "message body interceptors" and perhaps ReaderInterceptor and WriterInterceptor for the types. Maybe if we don't use the term "interceptor" by itself we can get away with this?
> >>
> >> -- Santiago
> >>
> >
> > Reader/WriterInterceptor sounds good. In fact even better than Handler.
>
> >>OK. If there are no objections, I plan to make this change. It is clear that people are very confused by the term "handler". We should, however, avoid using >>the term "interceptor" on its own to avoid confusion with the more general CDI/EJB concept.
>
> I'm good with this. BTW, did you give any thought around providing a "ResourceMethodInterceptor", for the lack of a better name. Basically, getting control just before calling the resource method and right after the method returns. This a very useful thing, especially to measure how long the resource method execution took.

 There's no need to add that to JAX-RS. Given that CDI and JAX-RS can be used together, you can just use interceptors from CDI for that [1].

-- Santiago

[1] http://docs.jboss.org/weld/reference/1.0.0/en-US/html/interceptors.html