|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xmlrpc.XmlRpcClient
public class 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.XmlRpcClientAsyncThread
|
Field Summary | |
---|---|
protected int |
asyncWorkers
|
protected java.util.Stack |
pool
|
protected XmlRpcTransportFactory |
transportFactory
|
(package private) java.util.TimeZone |
tz
|
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. |
|
XmlRpcClient(java.net.URL url,
XmlRpcTransportFactory transportFactory)
Construct a XML-RPC client with this URL and a specified transport factory. |
Method Summary | |
---|---|
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)
|
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
protected java.util.Stack pool
protected int workers
protected int asyncWorkers
protected XmlRpcTransportFactory transportFactory
java.util.TimeZone tz
Constructor Detail |
---|
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
Method Detail |
---|
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public java.net.URL getURL()
public void setBasicAuthentication(java.lang.String user, java.lang.String password)
DefaultXmlRpcTransport
,
LiteXmlRpcTransport
,
CommonsXmlRpcTransport
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
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 |