users@jsr311.java.net

Re: JAXRS handlers

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Fri, 28 Mar 2008 16:03:28 +0100

I think the same (-1)

Bill Burke schrieb:
> -1.
>
> I don't think we should be creating a new component model.
> Integration with Web Beans, EJB, and/or Spring would be good enough.
>
> Sergey Beryozkin wrote:
>> Hi
>>
>> Is there any chance for JAX-RS to introduce a notion of handlers,
>> such that they can be invoked before/after the
>> actual resource class has been invoked upon ? There's a number of
>> container-specific ways to handle it, for ex, servlet filters can be
>> used in a Servlet-aware container, but it would be handy to have a
>> notion of handlers in JAX-RS as well.
>>
>> For ex.
>>
>> interface ResourceHandler {
>>
>> Response handle(UriInfo uriInfo, Class resourceClass);
>> }
>>
>> For inbound handlers, if Response is null the the invocation
>> continues otherwise this Response is what needs to be returned
>> Similar (if not the same) interface can be created for out-bound
>> handlers.
>>
>> Such handlers can be used to extend the base JAX-RS implementation,
>> as far as handling of various queries is concerned.
>> For ex.
>> GET /foo?$coolFeatureQuery
>>
>> will result in either a per or post handler handling the
>> request/response somehow.
>>
>> Does it make sense ?
>>
>> Thanks, Sergey
>>
>>
>>
>>
>> ----------------------------
>> IONA Technologies PLC (registered in Ireland)
>> Registered Number: 171387
>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
>> Ireland
>