users@jersey.java.net

Re: Using HttpServletRequest/HttpServletResponse

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 17 Sep 2007 18:26:55 +0200

Aaron Anderson wrote:
> Any chance that HttpResponseAdapter or HttpRequestAdapter could be
> moved to a SPI util package? ServletAdaptor keeps it's WebApplication
> instance private so sub-classes cannot mutate it.
>

Would it be better to define an AbstractServletAdapter that can be
extended? since there are some subtle issues around supporting thread
local stuff that can be implemented by AbstractServletAdapter.


> Also, I noticed WebApplicationImpl contains the method public void
> register(Set<Class> resourceClasses). Will that eventually make it into
> the WebApplication SPI?
>

We can do that. I also think it worthwhile putting a default
ResourceConfig implementation in the API.

We are planning to change ResourceConfig so that as well as features one
can add properties to this, this could be a way to pass in the instance
of a particular ResourceProviderFactory to the RootResourceClass using
an agreed property name.

Paul.

> Thanks!
>
> Aaron
>
> */Paul Sandoz <Paul.Sandoz_at_Sun.COM>/* wrote:
>
>
> I have improved the abstract request/response classes that a container
> uses and moved them to the SPI, see [1, 2]. You can look at the servlet
> request [3] and response [4] for an example. Hopefully you will agree
> with me that it is a bit clearer and more stable than the previous
> solution.
>
> This will be part of the 0.3 stable release.
>
> Paul.
>
> [1]
> https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/src/spi/com/sun/ws/rest/spi/container/AbstractContainerRequest.java?view=markup
> [2]
> https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/src/spi/com/sun/ws/rest/spi/container/AbstractContainerResponse.java?view=markup
> [3]
> https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/src/impl/com/sun/ws/rest/impl/container/servlet/HttpRequestAdaptor.java?view=markup
> [4]
> https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/src/impl/com/sun/ws/rest/impl/container/servlet/HttpResponseAdaptor.java?view=markup
>
> --
> | ? + ? = To question
> ----------------\
> Paul Sandoz
> x38109
> +33-4-76188109
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
> ------------------------------------------------------------------------
> Need a vacation? Get great deals to amazing places
> <http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ-->on
> Yahoo! Travel.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109