Package org.jppf.serialization
Interface SerializationHandler
- All Known Implementing Classes:
AbstractSerializationHandler,ConcurrentHashMapHandler,JavaTimeSerializationHandler,VectorHandler
public interface SerializationHandler
- Author:
- Laurent Cohen
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectnewInstance(org.jppf.serialization.ClassDescriptor cd) Create a new instance of the class described by the specified descriptor.readDObject(org.jppf.serialization.Deserializer deserializer, org.jppf.serialization.ClassDescriptor cd) Deserialize an object of the type processed by this serialization handler.voidwriteObject(Object obj, org.jppf.serialization.Serializer serializer, org.jppf.serialization.ClassDescriptor cd) Serialize an object of the type processed by this serialization handler.
-
Method Details
-
writeObject
void writeObject(Object obj, org.jppf.serialization.Serializer serializer, org.jppf.serialization.ClassDescriptor cd) throws Exception Serialize an object of the type processed by this serialization handler.- Parameters:
obj- the object for which to write the fields.serializer- the serializer to use.cd- the class descriptor.- Throws:
Exception- if any error occurs.
-
readDObject
Object readDObject(org.jppf.serialization.Deserializer deserializer, org.jppf.serialization.ClassDescriptor cd) throws Exception Deserialize an object of the type processed by this serialization handler.- Parameters:
deserializer- the deserializer to use.cd- the class descriptor.- Returns:
- the deserialized object.
- Throws:
Exception- if any error occurs.
-
newInstance
Create a new instance of the class described by the specified descriptor.- Parameters:
cd- the class descriptor to use.- Returns:
- a new instance of the class.
- Throws:
Exception- if any error occurs.
-