Class ObjectSerializerFactory
java.lang.Object
org.identityconnectors.framework.common.serializer.ObjectSerializerFactory
- Direct Known Subclasses:
ObjectSerializerFactoryImpl
Serializer factory for serializing connector objects. The list of
supported types are as follows:
TODO: list supported types
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract 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 ObjectSerializerFactoryGet the singleton instance of theObjectSerializerFactory.abstract BinaryObjectDeserializerCreates aBinaryObjectDeserializerfor reading objects from the given stream.abstract BinaryObjectSerializerCreates aBinaryObjectSerializerfor writing objects to the given stream.abstract XmlObjectSerializernewXmlSerializer(Writer w, boolean includeHeader, boolean multiObject) Creates aBinaryObjectSerializerfor writing objects to the given stream.
-
Constructor Details
-
ObjectSerializerFactory
public ObjectSerializerFactory()
-
-
Method Details
-
getInstance
Get the singleton instance of theObjectSerializerFactory. -
newBinarySerializer
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
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
-