On Aug 24, 2012, at 4:39 PM, James Shaw <hertzsprung_at_gmail.com> wrote:
> I'm not sure if this is something that's been considered (and perhaps
> rejected) before. Would be possible to generate proxy classes that
> implement resource interfaces, then use these interfaces to
> communicate with that resource? For example:
>
> @Path("/myResource")
> public interface MyResource {
> @GET String getMyResource();
> }
>
> public class MyResourceImpl implements MyResource {
> String getMyResource() { return "foo"; }
> }
>
> Then something like:
> System.out.println(Client.proxy("http://localhost:9998",
> MyResource.class).getMyResource());
>> foo
>
> It seems like IntrospectionModeller.createResource() could provide the
> basis for something like this. Any thoughts?