Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.protocol
Class XmlMessageSerializer

java.lang.Object
  extended bycom.genesyslab.platform.commons.protocol.XmlMessageSerializer

public class XmlMessageSerializer
extends java.lang.Object


Constructor Summary
XmlMessageSerializer(ProtocolFactory factory)
          Create serializer for the protocol described by its factory.
 
Method Summary
 Message deserialize(javax.xml.transform.Source doc)
          Deserialize (restore) the message from an xml document
 void serialize(Message message, javax.xml.transform.Result result)
          Serialize protocol message to XML document.
 void setTransformer(javax.xml.transform.Transformer transformer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMessageSerializer

public XmlMessageSerializer(ProtocolFactory factory)
Create serializer for the protocol described by its factory.

Parameters:
factory - protocol factory
Method Detail

serialize

public void serialize(Message message,
                      javax.xml.transform.Result result)
               throws javax.xml.parsers.ParserConfigurationException,
                      com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
Serialize protocol message to XML document. There is following behavior if you work with DOM documents as result:

Parameters:
message - Message to serialize
result - xml representation of the message
Throws:
javax.xml.parsers.ParserConfigurationException - if failed to create document
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException - if some custom type object can't be serialized

deserialize

public Message deserialize(javax.xml.transform.Source doc)
                    throws com.genesyslab.platform.commons.protocol.runtime.codec.CodecException
Deserialize (restore) the message from an xml document

Parameters:
doc - xml representation of the message
Returns:
deserialized message
Throws:
com.genesyslab.platform.commons.protocol.runtime.codec.CodecException - if some custom type object can't be deserialized

setTransformer

public void setTransformer(javax.xml.transform.Transformer transformer)

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.