Package com.google.gwt.user.server.rpc
Class SerializationPolicy
- java.lang.Object
-
- com.google.gwt.user.server.rpc.SerializationPolicy
-
public abstract class SerializationPolicy extends java.lang.ObjectThis is an abstract class for representing the serialization policy for a given module andRemoteService. The serialize and deserialize queries are from the perspective of the server, not the web browser.
-
-
Constructor Summary
Constructors Constructor Description SerializationPolicy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getClientFieldNamesForEnhancedClass(java.lang.Class<?> clazz)Returns the field names of the given class known to the client for classes that are expected to be enhanced on the server to have additional fields, or null for classes that are not expected to be enhanced.abstract booleanshouldDeserializeFields(java.lang.Class<?> clazz)Returnstrueif the class' fields should be deserialized.abstract booleanshouldSerializeFields(java.lang.Class<?> clazz)Returnstrueif the class' fields should be serialized.booleanshouldSerializeFinalFields()Returns whether the client was compiled withrpc.XserializeFinalFields = true.abstract voidvalidateDeserialize(java.lang.Class<?> clazz)Validates that the specified class should be deserialized from a stream.abstract voidvalidateSerialize(java.lang.Class<?> clazz)Validates that the specified class should be serialized into a stream.
-
-
-
Method Detail
-
getClientFieldNamesForEnhancedClass
public java.util.Set<java.lang.String> getClientFieldNamesForEnhancedClass(java.lang.Class<?> clazz)
Returns the field names of the given class known to the client for classes that are expected to be enhanced on the server to have additional fields, or null for classes that are not expected to be enhanced.- Parameters:
clazz- the class to test- Returns:
- a set containing client field names, or null
-
shouldDeserializeFields
public abstract boolean shouldDeserializeFields(java.lang.Class<?> clazz)
Returnstrueif the class' fields should be deserialized.- Parameters:
clazz- the class to test- Returns:
trueif the class' fields should be deserialized
-
shouldSerializeFields
public abstract boolean shouldSerializeFields(java.lang.Class<?> clazz)
Returnstrueif the class' fields should be serialized.- Parameters:
clazz- the class to test- Returns:
trueif the class' fields should be serialized
-
shouldSerializeFinalFields
public boolean shouldSerializeFinalFields()
Returns whether the client was compiled withrpc.XserializeFinalFields = true.
-
validateDeserialize
public abstract void validateDeserialize(java.lang.Class<?> clazz) throws SerializationExceptionValidates that the specified class should be deserialized from a stream.- Parameters:
clazz- the class to validate- Throws:
SerializationException- if the class is not allowed to be deserialized
-
validateSerialize
public abstract void validateSerialize(java.lang.Class<?> clazz) throws SerializationExceptionValidates that the specified class should be serialized into a stream.- Parameters:
clazz- the class to validate- Throws:
SerializationException- if the class is not allowed to be serialized
-
-