org.apache.xmlrpc.client

Class XmlRpcCommonsTransportFactory

Implemented Interfaces:
XmlRpcTransportFactory

public class XmlRpcCommonsTransportFactory
extends XmlRpcTransportFactoryImpl

An HTTP transport factory, which is based on the Jakarta Commons HTTP Client.

Constructor Summary

XmlRpcCommonsTransportFactory(XmlRpcClient pClient)
Creates a new instance.

Method Summary

HttpClient
getHttpClient()
Returns the factories HttpClient.
XmlRpcTransport
getTransport()
void
setHttpClient(HttpClient pHttpClient)
Sets the factories HttpClient.

Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportFactoryImpl

getClient

Constructor Details

XmlRpcCommonsTransportFactory

public XmlRpcCommonsTransportFactory(XmlRpcClient pClient)
Creates a new instance.
Parameters:
pClient - The client, which is controlling the factory.

Method Details

getHttpClient

public HttpClient getHttpClient()
Returns the factories HttpClient. By default, a new instance of HttpClient 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 of HttpClient, give it to the factory, and use HttpClient.getState() to read or set cookies.


getTransport

public XmlRpcTransport getTransport()
Specified by:
getTransport in interface XmlRpcTransportFactory

setHttpClient

public void setHttpClient(HttpClient pHttpClient)
Sets the factories HttpClient. By default, a new instance of HttpClient 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 of HttpClient, give it to the factory, and use HttpClient.getState() to read or set cookies.


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.