public class XmlRpcClient extends java.lang.Object implements XmlRpcHandler
XmlRpcClientLite
may
work better for you.Modifier and Type | Class and Description |
---|---|
(package private) class |
XmlRpcClient.CallData |
(package private) class |
XmlRpcClient.XmlRpcClientAsyncThread |
Modifier and Type | Field and Description |
---|---|
protected int |
asyncWorkers |
private XmlRpcClient.CallData |
first |
private XmlRpcClient.CallData |
last |
private int |
maxThreads
The maximum number of threads which can be used concurrently, by defaut use the one defined
in XmlRpc
|
protected java.util.Stack |
pool |
private java.lang.String |
storedPassword |
private java.lang.String |
storedUser |
protected XmlRpcTransportFactory |
transportFactory |
(package private) java.util.TimeZone |
tz |
protected java.net.URL |
url |
protected int |
workers |
Constructor and Description |
---|
XmlRpcClient(java.lang.String url)
Construct a XML-RPC client for the URL represented by this String.
|
XmlRpcClient(java.lang.String hostname,
int port)
Construct a XML-RPC client for the specified hostname and port.
|
XmlRpcClient(java.net.URL url)
Construct a XML-RPC client with this URL.
|
XmlRpcClient(java.net.URL url,
XmlRpcTransportFactory transportFactory)
Construct a XML-RPC client with this URL and a specified transport
factory.
|
Modifier and Type | Method and Description |
---|---|
private DefaultXmlRpcTransport |
createDefaultTransport() |
protected XmlRpcTransport |
createTransport() |
(package private) XmlRpcClient.CallData |
dequeue() |
(package private) void |
enqueue(XmlRpcClient.CallData call) |
java.lang.Object |
execute(java.lang.String method,
java.util.Vector params)
Generate an XML-RPC request and send it to the server.
|
java.lang.Object |
execute(XmlRpcClientRequest request) |
java.lang.Object |
execute(XmlRpcClientRequest request,
XmlRpcTransport transport) |
void |
executeAsync(java.lang.String method,
java.util.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
|
java.util.TimeZone |
getTimeZone() |
java.net.URL |
getURL()
Return the URL for this XML-RPC client.
|
(package private) XmlRpcClientWorker |
getWorker(boolean async) |
static void |
main(java.lang.String[] args)
Just for testing.
|
(package private) void |
releaseWorker(XmlRpcClientWorker w,
boolean async)
Release possibly big per-call object references to allow them to be
garbage collected
|
void |
setBasicAuthentication(java.lang.String user,
java.lang.String password)
Deprecated.
Authentication is now handled by each XmlRpcTransport
|
void |
setMaxThreads(int maxThreads)
Set the MaxThreads for this Client
|
void |
setTimeZone(java.util.TimeZone z) |
protected java.net.URL url
private java.lang.String storedUser
private java.lang.String storedPassword
protected java.util.Stack pool
protected int workers
protected int asyncWorkers
protected XmlRpcTransportFactory transportFactory
private XmlRpcClient.CallData first
private XmlRpcClient.CallData last
private int maxThreads
java.util.TimeZone tz
public XmlRpcClient(java.net.URL url, XmlRpcTransportFactory transportFactory)
public XmlRpcClient(java.net.URL url)
public XmlRpcClient(java.lang.String url) throws java.net.MalformedURLException
java.net.MalformedURLException
public XmlRpcClient(java.lang.String hostname, int port) throws java.net.MalformedURLException
java.net.MalformedURLException
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public java.net.URL getURL()
public void setBasicAuthentication(java.lang.String user, java.lang.String password)
public java.lang.Object execute(java.lang.String method, java.util.Vector params) throws XmlRpcException, java.io.IOException
execute
in interface XmlRpcHandler
XmlRpcException:
- If the remote host returned a fault message.IOException:
- If the call could not be made because of lower
level problems.XmlRpcException
java.io.IOException
public java.lang.Object execute(XmlRpcClientRequest request) throws XmlRpcException, java.io.IOException
XmlRpcException
java.io.IOException
public java.lang.Object execute(XmlRpcClientRequest request, XmlRpcTransport transport) throws XmlRpcException, java.io.IOException
XmlRpcException
java.io.IOException
public void executeAsync(java.lang.String method, java.util.Vector params, AsyncCallback callback)
public void executeAsync(XmlRpcClientRequest request, AsyncCallback callback)
public void executeAsync(XmlRpcClientRequest request, AsyncCallback callback, XmlRpcTransport transport)
XmlRpcClientWorker getWorker(boolean async) throws java.io.IOException
async
- java.io.IOException
public void setTimeZone(java.util.TimeZone z)
public java.util.TimeZone getTimeZone()
void releaseWorker(XmlRpcClientWorker w, boolean async)
void enqueue(XmlRpcClient.CallData call)
method
- params
- callback
- XmlRpcClient.CallData dequeue()
protected XmlRpcTransport createTransport() throws XmlRpcClientException
XmlRpcClientException
private DefaultXmlRpcTransport createDefaultTransport()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright ? 1999-2002 Apache Software Foundation. All Rights Reserved.