Skip navigation links


org.identityconnectors.framework.common.serializer
Class ObjectSerializerFactory

java.lang.Object
  extended by org.identityconnectors.framework.common.serializer.ObjectSerializerFactory


public abstract class ObjectSerializerFactory
extends java.lang.Object

Serializer factory for serializing connector objects. The list of supported types are as follows:

See Also:
SerializerUtil

Constructor Summary
ObjectSerializerFactory()
           

 

Method Summary
abstract  void deserializeXmlStream(org.xml.sax.InputSource is, XmlObjectResultsHandler handler, boolean validate)
          Deserializes XML objects from a stream NOTE: Consider using SerializerUtil.deserializeXmlObject(String,boolean) for convenience deserializing a single object.
static ObjectSerializerFactory getInstance()
          Get the singleton instance of the ObjectSerializerFactory.
abstract  BinaryObjectDeserializer newBinaryDeserializer(java.io.InputStream is)
          Creates a BinaryObjectDeserializer for reading objects from the given stream.
abstract  BinaryObjectSerializer newBinarySerializer(java.io.OutputStream os)
          Creates a BinaryObjectSerializer for writing objects to the given stream.
abstract  XmlObjectSerializer newXmlSerializer(java.io.Writer w, boolean includeHeader, boolean multiObject)
          Creates a BinaryObjectSerializer for writing objects to the given stream.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ObjectSerializerFactory

public ObjectSerializerFactory()

Method Detail

getInstance

public static ObjectSerializerFactory getInstance()
Get the singleton instance of the ObjectSerializerFactory.

newBinarySerializer

public abstract BinaryObjectSerializer newBinarySerializer(java.io.OutputStream os)
Creates a BinaryObjectSerializer for writing objects to the given stream. NOTE: consider using SerializerUtil.serializeBinaryObject(Object) for convenience serializing a single object. NOTE2: do not mix and match SerializerUtil.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(java.io.InputStream is)
Creates a BinaryObjectDeserializer for reading objects from the given stream. NOTE: Consider using SerializerUtil.deserializeBinaryObject(byte[]) for convenience deserializing a single object. NOTE2: Do not mix and match SerializerUtil.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(java.io.Writer w,
                                                     boolean includeHeader,
                                                     boolean multiObject)
Creates a BinaryObjectSerializer for writing objects to the given stream. NOTE: consider using SerializerUtil.serializeXmlObject(Object,boolean) for convenience serializing a single object. NOTE2: do not mix and match SerializerUtil.serializeXmlObject(Object,boolean) with {deserializeXmlStream(InputSource, XmlObjectResultsHandler, boolean).
Parameters:
w - The writer
includeHeader - True to include the xml header
multiObject - 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(org.xml.sax.InputSource is,
                                          XmlObjectResultsHandler handler,
                                          boolean validate)
Deserializes XML objects from a stream NOTE: Consider using SerializerUtil.deserializeXmlObject(String,boolean) for convenience deserializing a single object. NOTE2: Do not mix and match SerializerUtil.deserializeXmlObject(String,boolean) with {newXmlSerializer(Writer, boolean, boolean).
Parameters:
is - The input source
handler - The callback to receive objects from the stream
validate - True iff we are to validate

Skip navigation links


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.