his / gwt-gae-channel

Automatically exported from code.google.com/p/gwt-gae-channel
0 stars 0 forks source link

Sending object instead of String in Channel API #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Does it possible to sending Object via Channel API instead of String?

Original issue reported on code.google.com by kobk...@gmail.com on 1 Mar 2011 at 11:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This book goes into some detail about using the Channel Service in a GWT app 
using this library: 
https://www.packtpub.com/google-app-engine-java-and-gwt-application-development/
book

If you download the code samples, you can see in ChannelServer.java that 
there's some code to send an GWT-RPC-serialized object down to the client, 
which the client can deserialize into an object.

Since this is using GWT-RPC serialization, the payload is obfuscated over the 
wire. It may be simpler to send standard JSON over the wire and deserialize 
using a JSNI overlay, or use an AutoBean: 
http://code.google.com/p/google-web-toolkit/wiki/AutoBean

Original comment by jasonhall@google.com on 1 Mar 2011 at 4:52

GoogleCodeExporter commented 9 years ago
The dance dance robot example: http://code.google.com/p/dance-dance-robot
is using the GWT-RPC serialization to send messages to the client

PushServer:
http://code.google.com/p/dance-dance-robot/source/browse/trunk/src/com/google/ap
pengine/demos/dda/server/PushServer.java#52

Client:
http://code.google.com/p/dance-dance-robot/source/browse/trunk/src/com/google/ap
pengine/demos/dda/client/Main.java#65

Original comment by buchholz...@googlemail.com on 1 Mar 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Thanks for the pointer, I had the same need it is has been very helpful.

Original comment by sebastie...@gmail.com on 25 Jul 2011 at 9:56

GoogleCodeExporter commented 9 years ago
Sending Proxy classes linke EntityProxy or ValueProxy which are used for 
RequestFactory would be great.

Original comment by samuelsc...@gmail.com on 30 Jan 2013 at 2:26