Package jetbrains.buildServer.xmlrpc
Class XmlRpcFactory
- java.lang.Object
-
- jetbrains.buildServer.xmlrpc.XmlRpcFactory
-
public class XmlRpcFactory extends Object
XmlRpcTarget factory class. XmlRpcTarget contains XML-RPC client implementation.
-
-
Constructor Summary
Constructors Constructor Description XmlRpcFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description XmlRpcTarget
create(String serverUrl, String userAgent, int timeoutMillis, boolean useApacheCommonsTransport)
Deprecated.XmlRpcTarget
create(String serverUrl, String userAgent, int timeoutMillis, boolean useApacheCommonsTransport, KeyStore trustStore)
Creates new XML-RPC target.XmlRpcTarget
createCommonsHttpTransportTarget(String serverUrl, String userAgent, int timeout, boolean keepAlive)
XmlRpcTarget
createCommonsHttpTransportTarget(String serverUrl, String userAgent, int timeout, boolean keepAlive, KeyStore trustStore)
Create CommonsHTTP based XmlRpc target.static XmlRpcFactory
getInstance()
void
setCredentialsProvider(XmlRpcTarget.XmlRpcCredentialsProvider credentialsProvider)
Sets provider for XML rpc call credentials.static void
setInstance(XmlRpcFactory instance)
void
setProxy(String proxyHost, int proxyPort)
Sets proxy settings into the XML-RPC client.void
setProxyAuthentication(String username, String password)
Sets proxy credentials, supported for httpclient transport only
-
-
-
Method Detail
-
getInstance
public static XmlRpcFactory getInstance()
-
createCommonsHttpTransportTarget
public XmlRpcTarget createCommonsHttpTransportTarget(String serverUrl, String userAgent, int timeout, boolean keepAlive)
Create CommonsHTTP based XmlRpc target.
If you use keepAlive connections, make sure all stale instances of XmlRpcTarget are disposed withXmlRpcTarget.disposeConnections()
- Parameters:
serverUrl
- server urluserAgent
- http agent nametimeout
- connection timeoutkeepAlive
- true to use HTTP/1.1 keep-alive feature- Returns:
- XmlRpcTarget instance of XmlRpc target
- Since:
- 7.1
-
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 withXmlRpcTarget.disposeConnections()
- Parameters:
serverUrl
- server urluserAgent
- http agent nametimeout
- connection timeoutkeepAlive
- true to use HTTP/1.1 keep-alive featuretrustStore
- 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)
Deprecated.Creates new XML-RPC target.- Parameters:
serverUrl
- url of the XML-RPC serveruserAgent
- user agenttimeoutMillis
- socket timeout in millisecondsuseApacheCommonsTransport
- 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 serveruserAgent
- user agenttimeoutMillis
- socket timeout in millisecondsuseApacheCommonsTransport
- 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 hostnameproxyPort
- proxy port
-
setProxyAuthentication
public void setProxyAuthentication(String username, String password)
Sets proxy credentials, supported for httpclient transport only- Parameters:
username
- proxy usernamepassword
- proxy password
-
setInstance
public static void setInstance(XmlRpcFactory instance)
-
setCredentialsProvider
public void setCredentialsProvider(XmlRpcTarget.XmlRpcCredentialsProvider credentialsProvider)
Sets provider for XML rpc call credentials.
-
-