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

[jsr339-experts] Re: client revisions

From: Markus KARG <markus_at_headcrashing.eu>
Date: Thu, 7 Jul 2011 19:02:07 +0200

As the maintainer of "WebDAV Support for JAX-RS" I actually take very much
care that the Client API will be extendable in that way, and no String must
be used.

> -----Original Message-----
> From: guilherme.silveira_at_gmail.com
> [mailto:guilherme.silveira_at_gmail.com] On Behalf Of Guilherme Silveira
> Sent: Mittwoch, 6. Juli 2011 16:41
> To: jsr339-experts
> Subject: [jsr339-experts] Re: client revisions
>
> > So we aren't trying to define a client API that is generic enough for
> > extension methods? Anymore?
> +1
>
> > Well, then suggest something.
> + HttpResponse response =
> client.request("http://www.google.com/").with(webdav()).propfind();
>
> Here is the implementation:
> :::: https://github.com/guilhermesilveira/jaxrs2-
> caelum/commit/924ae87adc30625ba284e409723524ead1763e2b#L0L-1
>
> What has been done:
> :::: Just wrapping around, but already providing the delegator and the
> wrapping mechanism:
>
> Currently anyone can do typos:
> ::: request.method("PROP_FINDY")
>
> Using the solution I mentioned we can provide ".propFind" without the
> need to change the specification. So it's type safe and it allows
> evolution. Does it make sense to force the user to use type safe and
> avoid "string-based" programming? Its just a matter of removing the
> .method(String) from the Invocation interface (= a few move and
> extracts).
>
> Regards
>
> Guilherme Silveira
> Caelum | Ensino e Inovação
> http://www.caelum.com.br/
>
>
>
> On Wed, Jul 6, 2011 at 10:19 AM, Bill Burke <bburke_at_redhat.com> wrote:
> >
> >
> > On 7/6/11 8:16 AM, Julian Reschke wrote:
> >>
> >> On 2011-07-06 13:50, Bill Burke wrote:
> >>>
> >>> Or, instead, simply
> >>>
> >>> WebDav dav = new WebDav(client);
> >>>
> >>> or
> >>>
> >>> WebDavRequest request = new WebDavRequest(client.request);
> >>>
> >>> Or, if you are a JAX-RS implementor, just have your request
> >>> implementations implement a custom interface then typecast the
> request:
> >>>
> >>> WebDavRequest req = (WebDavRequest)client.request();
> >>>
> >>> No need to get fancy-nancy.
> >>> ...
> >>
> >> So we aren't trying to define a client API that is generic enough
> for
> >> extension methods? Anymore?
> >
> >
> > Well, then suggest something.
> >
> > --
> > Bill Burke
> > JBoss, a division of Red Hat
> > http://bill.burkecentral.com
> >