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
Modifier and TypeFieldDescriptionstatic final String
Keyword for listing the serializable fields of an enhanced class that are visible to client code.static final boolean
Flag to enable using enhanced classes, for applications that need them and are taking appropriate steps to secure them.static final String
System property to enable gwt-rpc enhanced classes.static final String
Keyword for final field serialization strategy.static final String
Default encoding for serialization policy files. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getSerializationPolicyFileName
(String serializationPolicyStrongName) Returns the serialization policy file name from the serialization policy strong name.static SerializationPolicy
loadFromStream
(InputStream inputStream) Deprecated.static SerializationPolicy
loadFromStream
(InputStream inputStream, List<ClassNotFoundException> classNotFoundExceptions) Loads a SerializationPolicy from an input stream and optionally record anyClassNotFoundException
s.
-
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
SerializationPolicy
loaded 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 anyClassNotFoundException
s.- Parameters:
inputStream
- stream to load the SerializationPolicy from.classNotFoundExceptions
- if notnull
, all of theClassNotFoundException
s thrown while loading this serialization policy will be added to this list- Returns:
- a
SerializationPolicy
loaded 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)