Class XmlLoggingInternalClient

  • All Implemented Interfaces:
    SampXmlRpcClient

    public class XmlLoggingInternalClient
    extends InternalClient
    InternalClient subclass which additionally logs all XML-RPC calls/responses to an output stream.
    Since:
    2 Dec 2008
    Author:
    Mark Taylor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.PrintStream out_  
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlLoggingInternalClient​(java.net.URL endpoint, java.io.PrintStream out)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object deserializeResponse​(java.io.InputStream in)
      Deserializes an XML-RPC methodResponse document to a Java object.
      protected byte[] serializeCall​(java.lang.String method, java.util.List paramList)
      Generates the XML methodCall document corresponding to an XML-RPC method call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • out_

        private final java.io.PrintStream out_
    • Constructor Detail

      • XmlLoggingInternalClient

        public XmlLoggingInternalClient​(java.net.URL endpoint,
                                        java.io.PrintStream out)
        Constructor.
        Parameters:
        endpoint - endpoint
        out - output stream for logging
    • Method Detail

      • serializeCall

        protected byte[] serializeCall​(java.lang.String method,
                                       java.util.List paramList)
                                throws java.io.IOException
        Description copied from class: InternalClient
        Generates the XML methodCall document corresponding to an XML-RPC method call.
        Overrides:
        serializeCall in class InternalClient
        Parameters:
        method - methodName string
        paramList - list of XML-RPC parameters
        Returns:
        XML document as byte array
        Throws:
        java.io.IOException
      • deserializeResponse

        protected java.lang.Object deserializeResponse​(java.io.InputStream in)
                                                throws java.io.IOException
        Description copied from class: InternalClient
        Deserializes an XML-RPC methodResponse document to a Java object.
        Overrides:
        deserializeResponse in class InternalClient
        Parameters:
        in - input stream containing response document
        Throws:
        java.io.IOException