Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.protocol
Class XmlMessageSerializer

java.lang.Object
  extended by com.genesyslab.platform.commons.protocol.XmlMessageSerializer
Direct Known Subclasses:
RoutingServerXmlMessageSerializer, UniversalContactServerXmlMessageSerializer

public class XmlMessageSerializer
extends java.lang.Object


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

Constructor Detail

XmlMessageSerializer

public XmlMessageSerializer(ProtocolFactory factory)
Creates 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
Serializes 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
Deserializes (restores) 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)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.