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

[jsr339-experts] idea for extensions

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 15 Jun 2012 10:31:16 -0400

I"m not asking to bring back the ClientFactoryBuilder interface, but
maybe changing Client, WebTarget, Invocation, InvocationBuilder, etc.
would be interesting?

i.e.

public interface Client<WEBTARGET extends WebTarget, CONFIGURATION
extends Configuration, INVOCATION extends Invocation>

{

    WEBTARGET target(String uri);
...
}


Then you could have:

public class ResteasyClient implements Client<ResteasyWebTarget,
ResteasyConfiguration, ResteasyInvocation>
{

    ResteasyWebTarget target(String uri) {...}

...
}


Following me? Then vendors could provide extensions really easily.

ResteasyClient client = new ResteasyClient();
MyProxy proxy = client.target("http://base").proxy(MyProxy.class);

I don't know yet if this adds too much complexity for users to
understand the API.


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