Class ApacheUtils


  • class ApacheUtils
    extends java.lang.Object
    Provides utility methods to perform translations between the data structurs used by the org.apache.xmlrpc classes and those used by JSAMP.
    Since:
    22 Aug 2008
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ApacheUtils()
      Private constructor prevents instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object fromApache​(java.lang.Object data)
      Converts an object from Apache XML-RPC form to JSAMP XML-RPC form.
      static java.lang.Object toApache​(java.lang.Object obj)
      Converts an object from JSAMP XML-RPC form to Apache XML-RPC form.
      • Methods inherited from class java.lang.Object

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

      • ApacheUtils

        private ApacheUtils()
        Private constructor prevents instantiation.
    • Method Detail

      • toApache

        public static java.lang.Object toApache​(java.lang.Object obj)
        Converts an object from JSAMP XML-RPC form to Apache XML-RPC form. Basically, this means converting Maps to Hashtables and Lists to Vectors.
        Parameters:
        obj - XML-RPC data structure suitable for use within JSAMP
        Returns:
        XML-RPC data structure suitable for use within Apache
      • fromApache

        public static java.lang.Object fromApache​(java.lang.Object data)
        Converts an object from Apache XML-RPC form to JSAMP XML-RPC form. Since Hashtable implements Map and Vector implements List, this is a no-op.
        Parameters:
        data - XML-RPC data structure suitable for use within Apache
        Returns:
        XML-RPC data structure suitable for use within JSAMP