Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.rfid.edge.toolkit.workflow
Class SerializationHelper

    java.lang.Object
      com.bea.rfid.edge.toolkit.workflow.SerializationHelper

    public class SerializationHelper

extends Object

Singleton class with utility methods that help in serialization and deserialization of objects within the edge flow system. Most of the utility methods use `WorkflowNamingService` to get to the registered serializers and deserializers and hence need the naming service to be passed in to the methods.

Method Summary
`static SerializationHelper` | `getInstance()` Returns the singleton instance of this class.
`MessageDeserializer` | `lookupDeserializer(Document doc, WorkflowNamingService ns)` Looks up deserializer for a given XML Document.
`MessageSerializer` | `lookupSerializer(Object msg, WorkflowNamingService ns)` Looks up serializer for a given object.

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

Method Detail

### getInstance

    public static SerializationHelper getInstance()

  Returns the singleton instance of this class.

  Returns:
    The singleton instance.

### lookupSerializer

    public MessageSerializer lookupSerializer(Object msg,
                                              WorkflowNamingService ns)
                                       throws com.connecterra.ale.encoding.XMLSerializerException

  Looks up serializer for a given object. It will first try to find a serializer for object's specific class. If there are none registered for that specific class, it will go up its superclasses chain to see if there is a serializer registered for any of the supertypes. If there are none registered for the supertypes, it will look for serializers registered for any of the interfaces this object implements.

  Parameters:
    `msg` - The object for which a serializer is to be found.
    `ns` - Naming service implementation that will be used to lookup serializers.
  Returns:
    `MessageSerializer` for the input object.
  Throws:
    `com.connecterra.ale.encoding.XMLSerializerException` - If a serializer was not found for the object.

### lookupDeserializer

    public MessageDeserializer lookupDeserializer(Document doc,
                                                  WorkflowNamingService ns)
                                           throws com.connecterra.ale.encoding.XMLDeserializerException

  Looks up deserializer for a given XML Document. It will try to find deserializer for the document's root element's local name and namespace.

  Parameters:
    `doc` - The xml Document for which deserializer is to be found.
    `ns` - Naming service that has deserializers and serializers registered with it.
  Returns:
    `MessageDeserializer` for the input document.
  Throws:
    `com.connecterra.ale.encoding.XMLDeserializerException` - If no deserializer was found for the Document.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD