Serialization and deserialization
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Serialization is a way of saving a class-based object so the object can be recreated later or in a different context. The serialization process stores the values of an object's instance data members, properties, temp-tables, and ProDataSets. Deserialization is the process of then recreating the object using those stored values.
You can take advantage of the serialization/deserialization process for several use cases. For example, you can :
- pass an object between an application server and a remote ABL client
- save the objects that make up the context of an application server session, so that context is available no matter which agent happens to handle subsequent requests from the client
- save the objects that make up the context of an ABL client so that a given task can be resumed at a later time.
In the case of passing objects between an application server and ABL client, the AVM handles the actual serialization/deserialization process, but for the other cases, you must manage the process, using the built-in file stream classes and the serialization/deserializaton classes.