jsr370-experts@jax-rs-spec.java.net

Re: [jax-rs-spec users] client proxy framework

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Mon, 18 Apr 2016 16:03:29 +0200

Crossposting what I just replied to Adam on users mailing list wrt. this thread:
I would suggest to direct all your users who want this feature to JAX-WS. That’s the proper RPC technology for this type of tight client-server coupling.

We have discussed this at length earlier in JAX-RS 2.0. The position of spec leads on this topic did not change since then.

Marek


> On 06 Apr 2016, at 15:06, Bill Burke <bburke_at_redhat.com> wrote:
>
> Ping. Again, this would be good feature to add IMO. Its simple to implement and would be used by a lot of developers. I need to know soon if this is something the spec leads are interested in. I'm about to renounce my JAX-RS EG membership and hand it off to somebody else at Red Hat as I'm really busy with other things. If there is interest in this proposal, I'll stick around to write it up.
>
> On 2/28/2016 6:13 PM, Bill Burke wrote:
>> This is not a feature I came up with 1 week ago on a whim. Its a proven feature that has been around for 5+ years in Resteasy and is wildly popular. A number of other projects I'm involved with use it to publish their REST interface as its something users have demanded.
>>
>> I'd be happy to write it up, but I need to know soon as my schedule is really busy in 2016. IMO, it would probably be the most popular feature of 2.1 if it was added. Even non-Resteasy users would be familiar with it as its already documented in both revisions of my JAX-RS RESTFul Java O'Reilly books which have also been around for 5+ years. :)
>>
>> Again, it would be something like this:
>>
>> interface MyRestClient {
>> @GET
>> @Product("application/json")
>> @Path("{name}")
>> Customer get(@QueryParam("name") name);
>> }
>>
>> Client client = ...;
>> MyRestClient proxy = client.target("http://example.com").proxy(MyRestClient.class);
>>
>> Customer cust = proxy.get("Bill Burke");
>>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>