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

[jsr339-experts] Refactoring out generic invocations

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 26 Aug 2011 16:16:39 -0400

On 8/26/11 3:05 PM, Bill Burke wrote:
>
>
> On 8/26/11 2:48 PM, Marek Potociar wrote:
>> Are you now suggesting we take the generic invocation out??
>
> Yes. I think many specifications try to incorporate a lot of edge cases
> and end up seriously bloating themselves. This may be one of those
> scenarios. At the time, it seemed like a good idea that wouldn't affect
> the API very harshly. Things have changed.
>
> I'm pretty sure you could combine Invocation, Invocation.Builder, and
> SyncInvoker if you did this. I'll edit your latest stuff and show you.
>
>

Ok, I did this exercise based on latest HEAD:

https://github.com/patriot1burke/redhat-jaxrs-2.0-proposals-rev2/tree/master/jax-rs-api-r4

* Removed SyncInvoker
* Removed Invocation.Builder
* removed header methods from Invocation
* Invocation extends Configurable<Invocation>,
RequestHeaders.Builder<Invocation
* Renamed AsyncInvoker to AsyncInvocation
* AsyncInvocation extends Configuration<AsyncInvocation>,
RequestHeaders.Builder<AsyncInvocation>
* moved async() method back to Target. IMO this didn't/doesn't make
sense and it was an extra unneeded step:

target.request()....async().put()

I think this is a good first step in refactoring the API to get to where
everybody wants it.


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