users@jersey.java.net

Re: Re: [Jersey] State Client / HATEOAS proposal

From: gerard davison <gerard.davison_at_oracle.com>
Date: Mon, 12 Oct 2009 11:27:19 +0100

On 19:59, Paul Sandoz wrote:
>
>> Although this is a bit wordy it would allow a generation tool to grab
>> and generate an interface for this WADL, and if it contains suitable
>> grammar links it should be able to give you the correct types also. I
>> would be happy if someone has a better suggestion though....
>>
>
> Just a general point it would be good if JAXB related model classes
> could be used on the client or server. Thus when the server serializes
> links are embedded. When used on the client it helps create typed
> artifacts to aid clients traversing state.


Yeah, I am pretty sure this will work with the same classes/interfaces,
you can hide a lot of finangling behind the proxies. Currently you can
use the "Resource" proxies as both parameters and return values in the
proxy so it shouldn't take long. I just haven't had the time to write
the final bits of glue code in the server side as I currently need to
work out the following:

1. A instance of the "Client" in order to be able to create these links
for example the one you might use to inject WebResource instances.
(Obviously I would need to do something clever for links in the same
server as as not to require a network access)
2. The current base URL for the current request.
3. A helper code that can be used to extract parameters from a URI, code
that does the opposite of URIBuilder.build(...) I guess

If you have any thoughts on any short cuts on any of these I would be
interested to hear them.

Gerard




>
>
>> (Still waiting to hear back about the code)
>>
>
> OK!
>
> Paul.
> </div>
>

-- 
Gerard Davison | Senior Principal Software Engineer | +44 118 924 5095
Oracle JDeveloper Web Service Tooling Development
Oracle Corporation UK Ltd is a company incorporated in England & Wales.
Company Reg. No. 1782505.
Reg. office: Oracle Parkway, Thames Valley Park, Reading RG6 1RA.
Blog http://kingsfleet.blogspot.com