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

[jsr339-experts] Re: client revisions

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 07 Jul 2011 07:45:24 -0400

On 7/7/11 5:28 AM, Sergey Beryozkin wrote:
> I spent some time yesterday analyzing the current API draft on the wiki and Bill's version,
>
> This is actually pretty close, definitely invocation.get() being the last thing to call is good, but Invocation is just a wrong term, and
> the current version breaks the idea of Invocation being fully initialized for it to be used by batch processors, i.e, you can't call
> Invocation.invoke() without setting the right method name and generic processors have no idea about it.
>

NOt sure I'm understanding you. If you include an invoke() within
Invocation, it can be used by batch processors.

> Besides we still have a duplication between Link& HttpRequest as far as setting pathParams/etc is concerned which is a good sign that Link (which is misnamed IMHO) needs to extend HttpRequest and do what Invocation does now, in Bill's version, with Invocation and AsyncInvocation being already initialized, if used...Summarizing it in the diff email
>

I could agree that having pathParam, etc. on Link might not be a good
idea, but merging Link and HttpRequest is not a good idea. Link is a
reusable reference that might generate different requests. It might be
backed by a URI template, it might not.

You make invocations on a Link. Links are not invocations, nor do links
make invocations.

Bill

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