
public class LegacySerializationPolicy extends SerializationPolicy implements TypeNameObfuscator
The set of allowed types are:
IsSerializable
Types that derive from Serializable but do not meet any of the above
criteria may not be serialized as leaf types. However, their fields may be
serialized as super types of a legal type.
SERVICE_INTERFACE_ID| Modifier and Type | Method and Description |
|---|---|
String |
getClassNameForTypeId(String id)
Implemented to fail with a useful error message.
|
static LegacySerializationPolicy |
getInstance() |
String |
getTypeIdForClass(Class<?> clazz)
Implemented to fail with a useful error message.
|
boolean |
shouldDeserializeFields(Class<?> clazz)
Returns
true if the class' fields should be deserialized. |
boolean |
shouldSerializeFields(Class<?> clazz)
Returns
true if the class' fields should be serialized. |
void |
validateDeserialize(Class<?> clazz)
Validates that the specified class should be deserialized from a stream.
|
void |
validateSerialize(Class<?> clazz)
Validates that the specified class should be serialized into a stream.
|
getClientFieldNamesForEnhancedClasspublic static LegacySerializationPolicy getInstance()
public final String getClassNameForTypeId(String id) throws SerializationException
getClassNameForTypeId in interface TypeNameObfuscatorid - the type id that was present in the RPC payloadClass#forName,
to be instantiatedSerializationException - if there is no class that corresponds to the
obfuscated idpublic final String getTypeIdForClass(Class<?> clazz) throws SerializationException
getTypeIdForClass in interface TypeNameObfuscatorclazz - the class to be transmittedSerializationExceptionpublic boolean shouldDeserializeFields(Class<?> clazz)
SerializationPolicytrue if the class' fields should be deserialized.shouldDeserializeFields in class SerializationPolicyclazz - the class to testtrue if the class' fields should be deserializedpublic boolean shouldSerializeFields(Class<?> clazz)
SerializationPolicytrue if the class' fields should be serialized.shouldSerializeFields in class SerializationPolicyclazz - the class to testtrue if the class' fields should be serializedpublic void validateDeserialize(Class<?> clazz) throws SerializationException
SerializationPolicyvalidateDeserialize in class SerializationPolicyclazz - the class to validateSerializationException - if the class is not allowed to be
deserializedpublic void validateSerialize(Class<?> clazz) throws SerializationException
SerializationPolicyvalidateSerialize in class SerializationPolicyclazz - the class to validateSerializationException - if the class is not allowed to be serializedCopyright © 2018. All rights reserved.