Interface Serializer<T,U>
-
- Type Parameters:
T
- the type of the object to serializeU
- the type of the value to deserialize
- All Known Subinterfaces:
ByteArraySerializer<T>
,JsonSerializer<T>
,StringSerializer<T>
- All Known Implementing Classes:
FurySerializer
,JacksonSerializer
,JavaObjectSerializer
public interface Serializer<T,U>
This is only a marker interface. If custom serializers are required, they must implement one of the following interfaces instead:ByteArraySerializer
for serializing an object to a byte array representationStringSerializer
for serializing an object to a string representationJsonSerializer
for serializing an object to a JSON representation (encoded as String or BSON)
- Author:
- Andreas Oberhoff
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
deserialize(U value)
Deserializes a value.U
serialize(T object)
Serializes an object.
-
-
-
Method Detail
-
serialize
U serialize(T object) throws SerializerException
Serializes an object.- Parameters:
object
- the object to be serialized- Returns:
- the serialized value
- Throws:
SerializerException
- if serialization fails
-
deserialize
T deserialize(U value) throws SerializerException
Deserializes a value.- Parameters:
value
- the value to be deserialized- Returns:
- the deserialized object
- Throws:
SerializerException
- if deserialization fails
-
-