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

[jsr339-experts] Re: [ClientAPI] Naming Proposals

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 05 Jul 2011 07:40:13 -0400

On 7/2/11 3:56 AM, Markus KARG wrote:
> "Target" -- sorry but 'Link' is just confusing and "WebResource" was not
> wanted. Also Link might be needed for Hypermedia API later in this project.
>

When you start creating a Hypermedia API, you'll find you want to create
requests from a Link, so I don't see what's wrong with the "Link" name.
  IMO, Keep it, and figure out later on if it needs to be changed.

> "Invocation", "Call", "MethodExecution" -- Well, obvious.
>

I like the current hierarchy of HttpRequest->Invocation.


> I think everybody agrees that the separation is needed, so the current
> dispute should be easy to solve if more experts share their ideas about
> the naming.
>
> About invoke() I understand that it is not smart to need get().invoke()
> vs. get().queue(), but I do not see that invoke(invocationFactory.get())
> or queue(invocationFactory.get()) would be any better - but less fluent.
>

Didn't we originally have:

Response = invocation.get();
Future = invocatoin.getAsync();

Maybe have

AsyncInvocation a = client.async();
Invocation i = client.invocation();

Future f = a.get();
Future f = a.post();

String enttity = i.get(String.class);

Remove the invoke() and queue() methods. This way get, post, et. al. is
always invoked last to trigger the actual invocation.



-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com