Class SerializationPolicyLoader


  • public final class SerializationPolicyLoader
    extends java.lang.Object
    API for loading a SerializationPolicy.
    • Field Detail

      • CLIENT_FIELDS_KEYWORD

        public static final java.lang.String CLIENT_FIELDS_KEYWORD
        Keyword for listing the serializable fields of an enhanced class that are visible to client code.
        See Also:
        Constant Field Values
      • FINAL_FIELDS_KEYWORD

        public static final java.lang.String FINAL_FIELDS_KEYWORD
        Keyword for final field serialization strategy.
        See Also:
        Constant Field Values
      • SERIALIZATION_POLICY_FILE_ENCODING

        public static final java.lang.String SERIALIZATION_POLICY_FILE_ENCODING
        Default encoding for serialization policy files.
        See Also:
        Constant Field Values
      • ENABLE_GWT_ENHANCED_CLASSES_PROPERTY

        public static final java.lang.String 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" to true, any other value will leave this feature disabled in the server at runtime.
        See Also:
        Constant Field Values
      • ENABLE_ENHANCED_CLASSES

        public static final boolean ENABLE_ENHANCED_CLASSES
        Flag to enable using enhanced classes, for applications that need them and are taking appropriate steps to secure them. Defaults to false.
    • Method Detail

      • getSerializationPolicyFileName

        public static java.lang.String getSerializationPolicyFileName​(java.lang.String serializationPolicyStrongName)
        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​(java.io.InputStream inputStream)
                                                  throws java.io.IOException,
                                                         java.text.ParseException,
                                                         java.lang.ClassNotFoundException
        Loads a SerializationPolicy from an input stream.
        Parameters:
        inputStream - stream to load from
        Returns:
        a SerializationPolicy loaded from the input stream
        Throws:
        java.io.IOException - if an error occurs while reading the stream
        java.text.ParseException - if the input stream is not properly formatted
        java.lang.ClassNotFoundException - if a class specified in the serialization policy cannot be loaded
      • loadFromStream

        public static SerializationPolicy loadFromStream​(java.io.InputStream inputStream,
                                                         java.util.List<java.lang.ClassNotFoundException> classNotFoundExceptions)
                                                  throws java.io.IOException,
                                                         java.text.ParseException
        Loads a SerializationPolicy from an input stream and optionally record any ClassNotFoundExceptions.
        Parameters:
        inputStream - stream to load the SerializationPolicy from.
        classNotFoundExceptions - if not null, all of the ClassNotFoundExceptions thrown while loading this serialization policy will be added to this list
        Returns:
        a SerializationPolicy loaded from the input stream.
        Throws:
        java.io.IOException - if an error occurs while reading the stream
        java.text.ParseException - if the input stream is not properly formatted