|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.server.rpc.SerializationPolicy
com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
public class StandardSerializationPolicy
Standard implementation of a SerializationPolicy.
| Field Summary |
|---|
| Fields inherited from interface com.google.gwt.user.server.rpc.impl.TypeNameObfuscator |
|---|
SERVICE_INTERFACE_ID |
| Constructor Summary | |
|---|---|
StandardSerializationPolicy(java.util.Map<java.lang.Class<?>,java.lang.Boolean> serializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.Boolean> deserializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.String> obfuscatedTypeIds)
Constructs a SerializationPolicy from several Maps. |
|
StandardSerializationPolicy(java.util.Map<java.lang.Class<?>,java.lang.Boolean> serializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.Boolean> deserializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.String> obfuscatedTypeIds,
java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.String>> clientFields)
Constructs a SerializationPolicy from several Maps. |
|
| Method Summary | |
|---|---|
java.lang.String |
getClassNameForTypeId(java.lang.String id)
Returns the name of the class that should be instantiated based on an obfuscated identifier. |
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. |
java.lang.String |
getTypeIdForClass(java.lang.Class<?> clazz)
Returns the obfuscated identifier to be used to encode a class in the RPC wire format. |
boolean |
shouldDeserializeFields(java.lang.Class<?> clazz)
Returns true if the class' fields should be deserialized. |
boolean |
shouldSerializeFields(java.lang.Class<?> clazz)
Returns true if the class' fields should be serialized. |
void |
validateDeserialize(java.lang.Class<?> clazz)
Validates that the specified class should be deserialized from a stream. |
void |
validateSerialize(java.lang.Class<?> clazz)
Validates that the specified class should be serialized into a stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StandardSerializationPolicy(java.util.Map<java.lang.Class<?>,java.lang.Boolean> serializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.Boolean> deserializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.String> obfuscatedTypeIds)
SerializationPolicy from several Maps.
public StandardSerializationPolicy(java.util.Map<java.lang.Class<?>,java.lang.Boolean> serializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.Boolean> deserializationWhitelist,
java.util.Map<java.lang.Class<?>,java.lang.String> obfuscatedTypeIds,
java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.String>> clientFields)
SerializationPolicy from several Maps.
| Method Detail |
|---|
public final java.lang.String getClassNameForTypeId(java.lang.String id)
throws SerializationException
TypeNameObfuscator
getClassNameForTypeId in interface TypeNameObfuscatorid - the type id that was present in the RPC payload
Class.forName(java.lang.String),
to be instantiated
SerializationException - if there is no class that corresponds to the
obfuscated idpublic java.util.Set<java.lang.String> getClientFieldNamesForEnhancedClass(java.lang.Class<?> clazz)
SerializationPolicy
getClientFieldNamesForEnhancedClass in class SerializationPolicyclazz - the class to test
public final java.lang.String getTypeIdForClass(java.lang.Class<?> clazz)
throws SerializationException
TypeNameObfuscator
getTypeIdForClass in interface TypeNameObfuscatorclazz - the class to be transmitted
SerializationExceptionpublic boolean shouldDeserializeFields(java.lang.Class<?> clazz)
SerializationPolicytrue if the class' fields should be deserialized.
shouldDeserializeFields in class SerializationPolicyclazz - the class to test
true if the class' fields should be deserializedpublic boolean shouldSerializeFields(java.lang.Class<?> clazz)
SerializationPolicytrue if the class' fields should be serialized.
shouldSerializeFields in class SerializationPolicyclazz - the class to test
true if the class' fields should be serialized
public void validateDeserialize(java.lang.Class<?> clazz)
throws SerializationException
SerializationPolicy
validateDeserialize in class SerializationPolicyclazz - the class to validate
SerializationException - if the class is not allowed to be
deserialized
public void validateSerialize(java.lang.Class<?> clazz)
throws SerializationException
SerializationPolicy
validateSerialize in class SerializationPolicyclazz - the class to validate
SerializationException - if the class is not allowed to be serialized
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||