Package com.google.gwt.user.server.rpc
Class SerializationPolicyLoader
java.lang.Object
com.google.gwt.user.server.rpc.SerializationPolicyLoader
API for loading a
SerializationPolicy.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKeyword for listing the serializable fields of an enhanced class that are visible to client code.static final booleanFlag to enable using enhanced classes, for applications that need them and are taking appropriate steps to secure them.static final StringSystem property to enable gwt-rpc enhanced classes.static final StringKeyword for final field serialization strategy.static final StringDefault encoding for serialization policy files. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetSerializationPolicyFileName(String serializationPolicyStrongName) Returns the serialization policy file name from the serialization policy strong name.static SerializationPolicyloadFromStream(InputStream inputStream) Deprecated.static SerializationPolicyloadFromStream(InputStream inputStream, List<ClassNotFoundException> classNotFoundExceptions) Loads a SerializationPolicy from an input stream and optionally record anyClassNotFoundExceptions.
-
Field Details
-
CLIENT_FIELDS_KEYWORD
Keyword for listing the serializable fields of an enhanced class that are visible to client code.- See Also:
-
FINAL_FIELDS_KEYWORD
Keyword for final field serialization strategy.- See Also:
-
SERIALIZATION_POLICY_FILE_ENCODING
Default encoding for serialization policy files.- See Also:
-
ENABLE_GWT_ENHANCED_CLASSES_PROPERTY
System property to enable gwt-rpc enhanced classes. To use this, set the JVM system property with name "gwt.enhancedClasses.enabled" totrue, any other value will leave this feature disabled in the server at runtime.- See Also:
-
ENABLE_ENHANCED_CLASSES
public static final boolean ENABLE_ENHANCED_CLASSESFlag to enable using enhanced classes, for applications that need them and are taking appropriate steps to secure them. Defaults to false.
-
-
Method Details
-
getSerializationPolicyFileName
Returns the serialization policy file name from the serialization policy strong name.- Parameters:
serializationPolicyStrongName- the serialization policy strong name- Returns:
- the serialization policy file name from the serialization policy strong name
-
loadFromStream
@Deprecated public static SerializationPolicy loadFromStream(InputStream inputStream) throws IOException, ParseException, ClassNotFoundException Deprecated.Loads a SerializationPolicy from an input stream.- Parameters:
inputStream- stream to load from- Returns:
- a
SerializationPolicyloaded from the input stream - Throws:
IOException- if an error occurs while reading the streamParseException- if the input stream is not properly formattedClassNotFoundException- if a class specified in the serialization policy cannot be loaded
-
loadFromStream
public static SerializationPolicy loadFromStream(InputStream inputStream, List<ClassNotFoundException> classNotFoundExceptions) throws IOException, ParseException Loads a SerializationPolicy from an input stream and optionally record anyClassNotFoundExceptions.- Parameters:
inputStream- stream to load the SerializationPolicy from.classNotFoundExceptions- if notnull, all of theClassNotFoundExceptions thrown while loading this serialization policy will be added to this list- Returns:
- a
SerializationPolicyloaded from the input stream. - Throws:
IOException- if an error occurs while reading the streamParseException- if the input stream is not properly formatted
-
loadFromStream(InputStream, List)