Class StandardJavaSerializer

  • All Implemented Interfaces:
    Serializer

    public class StandardJavaSerializer
    extends java.lang.Object
    implements Serializer
    Implementation of the Serializer interface using java's standard object serialization. If compression is enabled, the serialized objects are compressed if the size of the corresponding byte array is larger than a configured threshold.
    • Constructor Detail

      • StandardJavaSerializer

        public StandardJavaSerializer()
    • Method Detail

      • setCompress

        public void setCompress​(boolean compress)
      • setCompressorMaxSize

        public void setCompressorMaxSize​(int compressorMaxSize)
      • setCompressThresholdSize

        public void setCompressThresholdSize​(int compressThresholdSize)
      • classnameReplacement

        protected java.lang.String classnameReplacement​(java.lang.String classname)
        For downward compatibility, there is a package name replacement during deserialization of workflow instances and responses. The default implementation ensures downward compatibility to copper <= 2.x.
        Parameters:
        classname - the workflow class name
        Returns:
        the adjusted workflow class name
      • serializeData

        protected java.lang.String serializeData​(Workflow<?> o)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeData

        protected java.lang.Object deserializeData​(SerializedWorkflow sw)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • serializeResponse

        public java.lang.String serializeResponse​(Response<?> r)
                                           throws java.lang.Exception
        Specified by:
        serializeResponse in interface Serializer
        Throws:
        java.lang.Exception
      • deserializeResponse

        public Response<?> deserializeResponse​(java.lang.String _data)
                                        throws java.lang.Exception
        Specified by:
        deserializeResponse in interface Serializer
        Throws:
        java.lang.Exception
      • serializeObject

        public java.lang.String serializeObject​(java.io.Serializable o)
                                         throws java.lang.Exception
        Specified by:
        serializeObject in interface Serializer
        Throws:
        java.lang.Exception
      • deserializeObject

        public java.io.Serializable deserializeObject​(java.lang.String _data)
                                               throws java.lang.Exception
        Specified by:
        deserializeObject in interface Serializer
        Throws:
        java.lang.Exception