users@jersey.java.net

Re: [com.sun.ws.rest.api.core.WebResource] interface removal?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 09 Nov 2007 10:58:56 +0100

Hi Jakub,

We originally thought that allowing such an interface would make for
simpler integration with other frameworks, but it is so limited the
value of the integration is minimal.

I think the resource model API you are working on will better enable
integration, for example if say a resource is written in JavaScript
there could be a specific way to annotate Java script objects and for
some JavaScript to generate the resource model.

And as you point out, if you really want to have one Java method support
more than one HTTP method it should be possible to implement such
functionality in the future because the the @HttpMethod refactoring.

Further more, if any developer is using this feature in Java in a
non-integration fashion there are easy work arounds.

So i think we should remove this feature and modify the unit tests (not
delete them).

Paul.

Jakub Podlesak wrote:
> Hi all,
>
> the [WebResource] interface has just one method:
> --cuthere--
> void handleRequest(HttpRequestContext request, HttpResponseContext response);
> --cuthere--
> which can be used to build up a low-level/general resources
> (serving GET and POST and ... by a single method)
>
> Given that [HttpMethod] annotation could be replaced by
> annotations for particular http methods [1],
> the whole [WebResource] interface could be probably removed.
>
> So far it is used only in several unit tests.
>
> Are there any objections removing the interface?
>
> Thanks,
>
> ~Jakub
>
> [1]https://jsr311.dev.java.net/issues/show_bug.cgi?id=15
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

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