Class StatefulExample

    • Constructor Detail

      • StatefulExample

        public StatefulExample()
    • Method Detail

      • serializeToJSON

        public net.sf.json.JSONObject serializeToJSON()
        This serializes the state of the Java module only. There is a QDl variable that is created, but that is stored in QDL's State object, so you don't need to do anything with it. There is no requirement on the structure of the JSON object. You are free to structure it however you want.
        Specified by:
        serializeToJSON in interface QDLMetaModule
        Returns:
      • deserializeFromJSON

        public void deserializeFromJSON​(net.sf.json.JSONObject json)
        This is invoked on deserialization for you with the JSON object you set. You may also do any other re-initialization tasks that are required to make your class functional. The contract states that when this method exits, the class's state should be fully restored.
        Specified by:
        deserializeFromJSON in interface QDLMetaModule
        Parameters:
        json -