Class XmlRpcCommonsTransportFactory
- All Implemented Interfaces:
XmlRpcTransportFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.httpclient.HttpClient
Returns the factoriesHttpClient
.Returns an instance ofXmlRpcTransport
.void
setHttpClient
(org.apache.commons.httpclient.HttpClient pHttpClient) Sets the factoriesHttpClient
.Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportFactoryImpl
getClient
-
Field Details
-
httpClient
private org.apache.commons.httpclient.HttpClient httpClient
-
-
Constructor Details
-
XmlRpcCommonsTransportFactory
Creates a new instance.- Parameters:
pClient
- The client, which is controlling the factory.
-
-
Method Details
-
getTransport
Description copied from interface:XmlRpcTransportFactory
Returns an instance ofXmlRpcTransport
. This may be a singleton, but the caller should not depend on that: A new instance may as well be created for any request.- Returns:
- The configured transport.
-
setHttpClient
public void setHttpClient(org.apache.commons.httpclient.HttpClient pHttpClient) Sets the factories
HttpClient
. By default, a new instance ofHttpClient
is created for any request.Reusing the
HttpClient
is required, if you want to preserve some state between requests. This applies, in particular, if you want to use cookies: In that case, create an instance ofHttpClient
, give it to the factory, and useHttpClient.getState()
to read or set cookies. -
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient()Returns the factories
HttpClient
. By default, a new instance ofHttpClient
is created for any request.Reusing the
HttpClient
is required, if you want to preserve some state between requests. This applies, in particular, if you want to use cookies: In that case, create an instance ofHttpClient
, give it to the factory, and useHttpClient.getState()
to read or set cookies.
-