public abstract class

SerializationPolicy

extends Object
java.lang.Object
   ↳ com.google.gwt.user.server.rpc.SerializationPolicy
Known Direct Subclasses

Class Overview

This is an abstract class for representing the serialization policy for a given module and RemoteService. The serialize and deserialize queries are from the perspective of the server, not the web browser.

Summary

Public Constructors
SerializationPolicy()
Public Methods
Set<String> getClientFieldNamesForEnhancedClass(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 boolean shouldDeserializeFields(Class<?> clazz)
Returns true if the class' fields should be deserialized.
abstract boolean shouldSerializeFields(Class<?> clazz)
Returns true if the class' fields should be serialized.
abstract void validateDeserialize(Class<?> clazz)
Validates that the specified class should be deserialized from a stream.
abstract void validateSerialize(Class<?> clazz)
Validates that the specified class should be serialized into a stream.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SerializationPolicy ()

Public Methods

public Set<String> getClientFieldNamesForEnhancedClass (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

public abstract boolean shouldDeserializeFields (Class<?> clazz)

Returns true if the class' fields should be deserialized.

Parameters
clazz the class to test
Returns
  • true if the class' fields should be deserialized

public abstract boolean shouldSerializeFields (Class<?> clazz)

Returns true if the class' fields should be serialized.

Parameters
clazz the class to test
Returns
  • true if the class' fields should be serialized

public abstract void validateDeserialize (Class<?> clazz)

Validates 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

public abstract void validateSerialize (Class<?> clazz)

Validates 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