org.apache.xmlrpc
public class XmlRpcClient extends Object implements XmlRpcHandler
XmlRpcClientLite
may
work better for you.
Version: $Id: XmlRpcClient.java 350048 2005-11-30 21:49:32 +0100 (Mi, 30 Nov 2005) jochen $
Nested Class Summary | |
---|---|
class | XmlRpcClient.CallData |
class | XmlRpcClient.XmlRpcClientAsyncThread |
Field Summary | |
---|---|
protected int | asyncWorkers |
XmlRpcClient.CallData | first |
XmlRpcClient.CallData | last |
int | maxThreads
The maximum number of threads which can be used concurrently, by defaut use the one defined
in XmlRpc |
protected Stack | pool |
String | storedPassword |
String | storedUser |
protected XmlRpcTransportFactory | transportFactory |
TimeZone | tz |
protected URL | url |
protected int | workers |
Constructor Summary | |
---|---|
XmlRpcClient(URL url, XmlRpcTransportFactory transportFactory)
Construct a XML-RPC client with this URL and a specified transport
factory. | |
XmlRpcClient(URL url)
Construct a XML-RPC client with this URL. | |
XmlRpcClient(String url)
Construct a XML-RPC client for the URL represented by this String. | |
XmlRpcClient(String hostname, int port)
Construct a XML-RPC client for the specified hostname and port. |
Method Summary | |
---|---|
DefaultXmlRpcTransport | createDefaultTransport() |
protected XmlRpcTransport | createTransport() |
XmlRpcClient.CallData | dequeue() |
void | enqueue(XmlRpcClient.CallData call) |
Object | execute(String method, Vector params)
Generate an XML-RPC request and send it to the server. |
Object | execute(XmlRpcClientRequest request) |
Object | execute(XmlRpcClientRequest request, XmlRpcTransport transport) |
void | executeAsync(String method, Vector params, AsyncCallback callback)
Generate an XML-RPC request and send it to the server in a new thread.
|
void | executeAsync(XmlRpcClientRequest request, AsyncCallback callback) |
void | executeAsync(XmlRpcClientRequest request, AsyncCallback callback, XmlRpcTransport transport) |
int | getMaxThreads()
Get the MaxThreads for this Client |
TimeZone | getTimeZone() |
URL | getURL()
Return the URL for this XML-RPC client. |
XmlRpcClientWorker | getWorker(boolean async) |
static void | main(String[] args)
Just for testing. |
void | releaseWorker(XmlRpcClientWorker w, boolean async)
Release possibly big per-call object references to allow them to be
garbage collected |
void | setBasicAuthentication(String user, String password)
Sets Authentication for this client. |
void | setMaxThreads(int maxThreads)
Set the MaxThreads for this Client |
void | setTimeZone(TimeZone z) |
Returns:
Parameters: method params callback
Throws: XmlRpcException: If the remote host returned a fault message. IOException: If the call could not be made because of lower level problems.
Parameters: async
Returns:
Throws: IOException
Deprecated: 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.See Also: DefaultXmlRpcTransport LiteXmlRpcTransport CommonsXmlRpcTransport