Class XmlRpcFactory


  • public class XmlRpcFactory
    extends Object
    XmlRpcTarget factory class. XmlRpcTarget contains XML-RPC client implementation.
    • Constructor Detail

      • XmlRpcFactory

        public XmlRpcFactory()
    • Method Detail

      • createCommonsHttpTransportTarget

        public XmlRpcTarget createCommonsHttpTransportTarget​(String serverUrl,
                                                             String userAgent,
                                                             int timeout,
                                                             boolean keepAlive,
                                                             KeyStore trustStore)
        Create CommonsHTTP based XmlRpc target.
        If you use keepAlive connections, make sure all stale instances of XmlRpcTarget are disposed with XmlRpcTarget.disposeConnections()
        Parameters:
        serverUrl - server url
        userAgent - http agent name
        timeout - connection timeout
        keepAlive - true to use HTTP/1.1 keep-alive feature
        trustStore - trust store for external connections
        Returns:
        XmlRpcTarget instance of XmlRpc target
        Since:
        2018.1
      • create

        public XmlRpcTarget create​(String serverUrl,
                                   String userAgent,
                                   int timeoutMillis,
                                   boolean useApacheCommonsTransport)
        Creates new XML-RPC target.
        Parameters:
        serverUrl - url of the XML-RPC server
        userAgent - user agent
        timeoutMillis - socket timeout in milliseconds
        useApacheCommonsTransport - whether to use commons http client based transport or standard Java UrlConnection based transport (DEPRECATED - always assumed to be true)
        Returns:
        XML-RPC target
      • create

        public XmlRpcTarget create​(String serverUrl,
                                   String userAgent,
                                   int timeoutMillis,
                                   boolean useApacheCommonsTransport,
                                   KeyStore trustStore)
        Creates new XML-RPC target.
        Parameters:
        serverUrl - url of the XML-RPC server
        userAgent - user agent
        timeoutMillis - socket timeout in milliseconds
        useApacheCommonsTransport - whether to use commons http client based transport or standard Java UrlConnection based transport (DEPRECATED - always assumed to be true)
        trustStore - trust store for external connections
        Returns:
        XML-RPC target
        Since:
        2018.1
      • setProxy

        public void setProxy​(String proxyHost,
                             int proxyPort)
        Sets proxy settings into the XML-RPC client. Currently proxy settings supported for httpclient transport only.
        Parameters:
        proxyHost - proxy hostname
        proxyPort - proxy port
      • setProxyAuthentication

        public void setProxyAuthentication​(String username,
                                           String password)
        Sets proxy credentials, supported for httpclient transport only
        Parameters:
        username - proxy username
        password - proxy password
      • setInstance

        public static void setInstance​(XmlRpcFactory instance)