A multithreaded, reusable XML-RPC client object. Use this if you
need a full-grown HTTP client (e.g. for Proxy and Basic Auth
support). If you don't need that, XmlRpcClientLite
may
work better for you.
asyncWorkers
protected int asyncWorkers
maxThreads
private int maxThreads
The maximum number of threads which can be used concurrently, by defaut use the one defined
in XmlRpc
storedPassword
private String storedPassword
storedUser
private String storedUser
tz
(package private) TimeZone tz
workers
protected int workers
XmlRpcClient
public XmlRpcClient(String url)
throws MalformedURLException
Construct a XML-RPC client for the URL represented by this String.
XmlRpcClient
public XmlRpcClient(String hostname,
int port)
throws MalformedURLException
Construct a XML-RPC client for the specified hostname and port.
XmlRpcClient
public XmlRpcClient(URL url)
Construct a XML-RPC client with this URL.
XmlRpcClient
public XmlRpcClient(URL url,
XmlRpcTransportFactory transportFactory)
Construct a XML-RPC client with this URL and a specified transport
factory.
execute
public Object execute(String method,
Vector params)
throws XmlRpcException,
IOException
Generate an XML-RPC request and send it to the server. Parse the result
and return the corresponding Java object.
- execute in interface XmlRpcHandler
executeAsync
public void executeAsync(String method,
Vector params,
AsyncCallback callback)
Generate an XML-RPC request and send it to the server in a new thread.
This method returns immediately.
If the callback parameter is not null, it will be called later to handle
the result or error when the call is finished.
getMaxThreads
public int getMaxThreads()
Get the MaxThreads for this Client
getTimeZone
public TimeZone getTimeZone()
getURL
public URL getURL()
Return the URL for this XML-RPC client.
main
public static void main(args[] )
throws Exception
Just for testing.
releaseWorker
(package private) void releaseWorker(XmlRpcClientWorker w,
boolean async)
Release possibly big per-call object references to allow them to be
garbage collected
setBasicAuthentication
public void setBasicAuthentication(String user,
String password)
Authentication is now handled by each XmlRpcTransport
Sets Authentication for this client. This will be sent as Basic
Authentication header to the server as described in
http://www.ietf.org/rfc/rfc2617.txt.
This method has been deprecated. Furthermore, it has no
effect on the overloads for execute and executeAsync that
use an XmlRpcClientRequest or an XmlRpcTransport.
setMaxThreads
public void setMaxThreads(int maxThreads)
Set the MaxThreads for this Client
setTimeZone
public void setTimeZone(TimeZone z)