On 21 sep, 10:37, maku <[email protected]> wrote:
> Hi,
>
> I would like to bundle different RPC calls into one physical http
> call.
>
> The idea is to use GWT serialization mechanism and generic
> functionality to handle this. I could imagine a generic RPC method
> with has a DTO as paramter and the DTO contains n chunks of
> information where every chunk contains the method information and the
> parameters for the method. The server process uses the information to
> call several methods (via reflection) and then sends back n results to
> the client
>
> The direction from the server to the client seems rather clear:
>
> RPC.encodeResponseForSuccess(...) returns a String which can be passed
> back to the client. This String could than be processed with
> SerializationStreamReader.readObject
>
> But the direction from the client is not so obvious...
>
> Could anybody of you give me a hint how to do this?
If you use a "command pattern" (i.e. have your RPC have only one
method and use different Command/Action classes to determine which
action shuld be performed), then batching is just a matter of sending
a "super-action" whose "parameters" are a list of commands/actions.
Have a look at
http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html
about the command pattern for RPC, and http://code.google.com/p/gwt-dispatch/
for a sample implementation.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---