Class ObjectSerializerFactory
- java.lang.Object
-
- org.identityconnectors.framework.common.serializer.ObjectSerializerFactory
-
public abstract class ObjectSerializerFactory extends Object
Serializer factory for serializing connector objects. The list of supported types are as follows: TODO: list supported types- See Also:
SerializerUtil
-
-
Constructor Summary
Constructors Constructor Description ObjectSerializerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddeserializeXmlStream(InputSource is, XmlObjectResultsHandler handler, boolean validate)Deserializes XML objects from a stream NOTE: Consider usingSerializerUtil.deserializeXmlObject(String,boolean)for convenience deserializing a single object.static ObjectSerializerFactorygetInstance()Get the singleton instance of theObjectSerializerFactory.abstract BinaryObjectDeserializernewBinaryDeserializer(InputStream is)Creates aBinaryObjectDeserializerfor reading objects from the given stream.abstract BinaryObjectSerializernewBinarySerializer(OutputStream os)Creates aBinaryObjectSerializerfor writing objects to the given stream.abstract XmlObjectSerializernewXmlSerializer(Writer w, boolean includeHeader, boolean multiObject)Creates aBinaryObjectSerializerfor writing objects to the given stream.
-
-
-
Method Detail
-
getInstance
public static ObjectSerializerFactory getInstance()
Get the singleton instance of theObjectSerializerFactory.
-
newBinarySerializer
public abstract BinaryObjectSerializer newBinarySerializer(OutputStream os)
Creates aBinaryObjectSerializerfor writing objects to the given stream. NOTE: consider usingSerializerUtil.serializeBinaryObject(Object)for convenience serializing a single object. NOTE2: do not mix and matchSerializerUtil.serializeBinaryObject(Object)with {newBinaryDeserializer(InputStream). This is unsafe since there is header information and state associated with the stream. Objects written using one method must be read using the proper corresponding method.- Parameters:
os- The stream- Returns:
- The serializer
-
newBinaryDeserializer
public abstract BinaryObjectDeserializer newBinaryDeserializer(InputStream is)
Creates aBinaryObjectDeserializerfor reading objects from the given stream. NOTE: Consider usingSerializerUtil.deserializeBinaryObject(byte[])for convenience deserializing a single object. NOTE2: Do not mix and matchSerializerUtil.deserializeBinaryObject(byte[])with {newBinarySerializer(OutputStream). This is unsafe since there is header information and state associated with the stream. Objects written using one method must be read using the proper corresponding method.- Parameters:
is- The stream- Returns:
- The deserializer
-
newXmlSerializer
public abstract XmlObjectSerializer newXmlSerializer(Writer w, boolean includeHeader, boolean multiObject)
Creates aBinaryObjectSerializerfor writing objects to the given stream. NOTE: consider usingSerializerUtil.serializeXmlObject(Object,boolean)for convenience serializing a single object. NOTE2: do not mix and matchSerializerUtil.serializeXmlObject(Object,boolean)with {deserializeXmlStream(InputSource, XmlObjectResultsHandler, boolean).- Parameters:
w- The writerincludeHeader- True to include the xml headermultiObject- Is this to produce a multi-object document. If false, only a single object may be written.- Returns:
- The serializer
-
deserializeXmlStream
public abstract void deserializeXmlStream(InputSource is, XmlObjectResultsHandler handler, boolean validate)
Deserializes XML objects from a stream NOTE: Consider usingSerializerUtil.deserializeXmlObject(String,boolean)for convenience deserializing a single object. NOTE2: Do not mix and matchSerializerUtil.deserializeXmlObject(String,boolean)with {newXmlSerializer(Writer, boolean, boolean).- Parameters:
is- The input sourcehandler- The callback to receive objects from the streamvalidate- True if we are to validate
-
-