ArcBees/GWTP — pull request #149 by Chris-V (2013-02-04 15:11:23+00:00)
Title: Rest Dispatch

This is a rough implementation of a client Rest Dispatch. It is using @piriti to serialize data from and to JSON.

There is still a lot of work to perform to make it production ready. I have a bunch of TODOs through the code. Additionally, it would require a proper Sample and documentation.

It also lack support for ClientActionHandlers, ClientCache and (possibly) security cookies/headers. At some point, it will also need support for custom serializers (I am thinking of an annotation like @SerializeWith(MyCustomSerializer.class), but things can still change).

Additionally, it should support JSR311 annotations properly. That is, PathParam, QueryParam, FormParam should (http://jsr311.java.net/nonav/releases/1.1/index.html):
1. Be a primitive type
2. Have a constructor that accepts a single String argument
3. Have a static method named valueOf or fromString that accepts a single String argument (see, for example, Integer.valueOf(String))
Be List, Set or SortedSet, where T satisfies 2 or 3 above. The resulting collection is read-only.

Right now, I roughly added support for 1 and 2 and allowed a single body parameter that is automatically serialized and is mutually exclusive with any FormParam.

So let's start with this, improve it, and head toward improvements after ;)