Class XmlMessageTranslator

  • All Implemented Interfaces:
    AdaptrisMessageTranslator, ComponentLifecycle, MessageTypeTranslator, MetadataHandlerContext

    public class XmlMessageTranslator
    extends MessageTypeTranslatorImp

    Translates between AdaptrisMessage and progress.message.jclient.XMLMessage.

    In addition to handling progress.message.jclient.XMLMessage, this translator delegates ByteMessage, ObjectMessage and TextMessage to the appropriate translator

    In the adapter configuration file this class is aliased as sonic-xml-message-translator which is the preferred alternative to the fully qualified classname when building your configuration.

    License Required: BASIC

    • Constructor Detail

      • XmlMessageTranslator

        public XmlMessageTranslator()
    • Method Detail

      • translate

        public javax.jms.Message translate​(AdaptrisMessage msg)
                                    throws javax.jms.JMSException

        Translates an AdaptrisMessage into a MultipartMessage.

        Parameters:
        msg - the AdaptrisMessage to translate
        Returns:
        a new MultipartMessage
        Throws:
        javax.jms.JMSException
      • translate

        public AdaptrisMessage translate​(javax.jms.Message msg)
                                  throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • stop

        public void stop()
      • close

        public void close()
      • getDocumentBuilderFactory

        public java.lang.String getDocumentBuilderFactory()
      • setDocumentBuilderFactory

        public void setDocumentBuilderFactory​(java.lang.String documentBuilderFactory)
        Set the document builder factory classname to attach to the XMLMessage.
        Parameters:
        documentBuilderFactory - the fully qualified classname if required.
      • getNamespaceAware

        public java.lang.Boolean getNamespaceAware()
      • setNamespaceAware

        public void setNamespaceAware​(java.lang.Boolean namespaceAware)
        Whether or not the internal document builder factory is namesapce aware.
        Parameters:
        namespaceAware - true to make it namespace aware; default is false if not specified.
      • getSaxParserFactory

        public java.lang.String getSaxParserFactory()
      • setSaxParserFactory

        public void setSaxParserFactory​(java.lang.String saxParserFactory)
        Set the SAX Parser factory classname to attach to the XMLMessage.
        Parameters:
        saxParserFactory - the fully qualified classname if required.
      • getXmlEncoding

        public java.lang.String getXmlEncoding()
      • setXmlEncoding

        public void setXmlEncoding​(java.lang.String xmlEncoding)