|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.gwt20.client.GwtRpcClientSerializer
public abstract class GwtRpcClientSerializer
The base class for serializers. To instantiate this class follow this example:
@SerialTypes({ MyType1.class, MyType2.class })
public abstract class MyCometSerializer extends AtmosphereGWTSerializer {}
AtmosphereGWTSerializer serializer = GWT.create(MyCometSerializer.class);
AtmosphereClient client = new AtmosphereClient(url, serializer, listener);
Where MyType1 and MyType2 are the types that your expecting to receive from the server.
If you have a class hierarchy of messages that you want to send you only need to supply the base class here.
For instance:
public class Message {}
public class MessageA extends Message {}
public class MessageB extends Message {}
@SerialTypes( Message.class )
public abstract class MyCometSerializer extends AtmosphereGWTSerializer {}
| Constructor Summary | |
|---|---|
GwtRpcClientSerializer()
|
|
| Method Summary | |
|---|---|
Object |
deserialize(String raw)
You need to implement this method in your serializer |
protected abstract com.google.gwt.user.client.rpc.impl.Serializer |
getRPCSerializer()
|
boolean |
isEnableBuffering()
|
String |
serialize(Object message)
You need to implement this method in your serializer |
void |
setEnableBuffering(boolean enableBuffering)
Set to true to enable multiple objects chunked in one single string parsing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GwtRpcClientSerializer()
| Method Detail |
|---|
public Object deserialize(String raw)
throws com.google.gwt.user.client.rpc.SerializationException
ClientSerializer
deserialize in interface ClientSerializercom.google.gwt.user.client.rpc.SerializationException
public String serialize(Object message)
throws com.google.gwt.user.client.rpc.SerializationException
ClientSerializer
serialize in interface ClientSerializercom.google.gwt.user.client.rpc.SerializationExceptionprotected abstract com.google.gwt.user.client.rpc.impl.Serializer getRPCSerializer()
public boolean isEnableBuffering()
public void setEnableBuffering(boolean enableBuffering)
enableBuffering - true to enable multiple objects chunked in one single string parsing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||