|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlrpc.XmlRpcClient
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.
Nested Class Summary | |
(package private) class |
XmlRpcClient.CallData
|
(package private) class |
XmlRpcClient.Worker
|
Field Summary | |
protected int |
asyncWorkers
|
private java.lang.String |
auth
|
private XmlRpcClient.CallData |
first
|
private XmlRpcClient.CallData |
last
|
protected java.util.Stack |
pool
|
protected java.net.URL |
url
|
protected int |
workers
|
Constructor Summary | |
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. |
Method Summary | |
(package private) XmlRpcClient.CallData |
dequeue()
|
(package private) void |
enqueue(java.lang.String method,
java.util.Vector params,
AsyncCallback callback)
|
java.lang.Object |
execute(java.lang.String method,
java.util.Vector params)
Generate an XML-RPC request and send it to the server. |
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. |
java.net.URL |
getURL()
Return the URL for this XML-RPC client. |
(package private) XmlRpcClient.Worker |
getWorker(boolean async)
|
static void |
main(java.lang.String[] args)
Just for testing. |
(package private) void |
releaseWorker(XmlRpcClient.Worker 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)
Sets Authentication for this client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.net.URL url
private java.lang.String auth
protected java.util.Stack pool
protected int workers
protected int asyncWorkers
private XmlRpcClient.CallData first
private XmlRpcClient.CallData last
Constructor Detail |
public XmlRpcClient(java.net.URL url)
public XmlRpcClient(java.lang.String url) throws java.net.MalformedURLException
public XmlRpcClient(java.lang.String hostname, int port) throws java.net.MalformedURLException
Method Detail |
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 void executeAsync(java.lang.String method, java.util.Vector params, AsyncCallback callback)
XmlRpcClient.Worker getWorker(boolean async) throws java.io.IOException
async
-
java.io.IOException
void releaseWorker(XmlRpcClient.Worker w, boolean async)
void enqueue(java.lang.String method, java.util.Vector params, AsyncCallback callback)
method
- params
- callback
- XmlRpcClient.CallData dequeue()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |