Package de.timroes.axmlrpc.serializer
Interface Serializer
-
- All Known Implementing Classes:
ArraySerializer
,Base64Serializer
,BooleanSerializer
,DateTimeSerializer
,DoubleSerializer
,IntSerializer
,NullSerializer
,StringSerializer
,StructSerializer
public interface Serializer
A Serializer is responsible to serialize a specific type of data to an xml tag and deserialize the content of this xml tag back to an object.- Author:
- Tim Roes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
deserialize(org.w3c.dom.Element content)
This method takes an xml type element and deserialize it to an object.XmlElement
serialize(java.lang.Object object)
This method takes an object and returns a representation as a string containing the right xml type tag.
-
-
-
Method Detail
-
deserialize
java.lang.Object deserialize(org.w3c.dom.Element content) throws XMLRPCException
This method takes an xml type element and deserialize it to an object.- Parameters:
content
- Must be an xml element of a specific type.- Returns:
- The deserialized content.
- Throws:
XMLRPCException
- Will be thrown whenervt the deserialization fails.
-
serialize
XmlElement serialize(java.lang.Object object)
This method takes an object and returns a representation as a string containing the right xml type tag. The returning string must be useable within a value tag.- Parameters:
object
- The object that should be serialized.- Returns:
- An XmlElement representation of the object.
-
-