|
|||||||||
| Home >> All >> org >> apache >> [ xmlrpc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xmlrpc
Class XmlRpcClient

java.lang.Objectorg.apache.xmlrpc.XmlRpcClient
- All Implemented Interfaces:
- XmlRpcHandler
- Direct Known Subclasses:
- XmlRpcClientLite
- public class XmlRpcClient
- extends java.lang.Object
- implements XmlRpcHandler
- extends java.lang.Object
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.
- Version:
- $Id: XmlRpcClient.java,v 1.22 2005/04/22 10:25:57 hgomez Exp $
| Nested Class Summary | |
(package private) class |
XmlRpcClient.CallData
|
(package private) class |
XmlRpcClient.XmlRpcClientAsyncThread
|
| Field Summary | |
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
|
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 | |
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.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
url
protected java.net.URL url
storedUser
private java.lang.String storedUser
storedPassword
private java.lang.String storedPassword
pool
protected java.util.Stack pool
workers
protected int workers
asyncWorkers
protected int asyncWorkers
transportFactory
protected XmlRpcTransportFactory transportFactory
first
private XmlRpcClient.CallData first
last
private XmlRpcClient.CallData last
maxThreads
private int maxThreads
- The maximum number of threads which can be used concurrently, by defaut use the one defined
in XmlRpc
| Constructor Detail |
XmlRpcClient
public XmlRpcClient(java.net.URL url, XmlRpcTransportFactory transportFactory)
- Construct a XML-RPC client with this URL and a specified transport
factory.
XmlRpcClient
public XmlRpcClient(java.net.URL url)
- Construct a XML-RPC client with this URL.
XmlRpcClient
public XmlRpcClient(java.lang.String url) throws java.net.MalformedURLException
- Construct a XML-RPC client for the URL represented by this String.
XmlRpcClient
public XmlRpcClient(java.lang.String hostname, int port) throws java.net.MalformedURLException
- Construct a XML-RPC client for the specified hostname and port.
| Method Detail |
setMaxThreads
public void setMaxThreads(int maxThreads)
- Set the MaxThreads for this Client
getMaxThreads
public int getMaxThreads()
- Get the MaxThreads for this Client
getURL
public java.net.URL getURL()
- Return the URL for this XML-RPC client.
setBasicAuthentication
public void setBasicAuthentication(java.lang.String user, java.lang.String password)
- 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.
- 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.
execute
public java.lang.Object execute(java.lang.String method, java.util.Vector params) throws XmlRpcException, java.io.IOException
- Generate an XML-RPC request and send it to the server. Parse the result
and return the corresponding Java object.
- Specified by:
executein interfaceXmlRpcHandler
execute
public java.lang.Object execute(XmlRpcClientRequest request) throws XmlRpcException, java.io.IOException
execute
public java.lang.Object execute(XmlRpcClientRequest request, XmlRpcTransport transport) throws XmlRpcException, java.io.IOException
executeAsync
public 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.
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.
executeAsync
public void executeAsync(XmlRpcClientRequest request, AsyncCallback callback)
executeAsync
public void executeAsync(XmlRpcClientRequest request, AsyncCallback callback, XmlRpcTransport transport)
getWorker
XmlRpcClientWorker getWorker(boolean async) throws java.io.IOException
releaseWorker
void releaseWorker(XmlRpcClientWorker w, boolean async)
- Release possibly big per-call object references to allow them to be
garbage collected
enqueue
void enqueue(XmlRpcClient.CallData call)
dequeue
XmlRpcClient.CallData dequeue()
createTransport
protected XmlRpcTransport createTransport() throws XmlRpcClientException
createDefaultTransport
private DefaultXmlRpcTransport createDefaultTransport()
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Just for testing.
|
|||||||||
| Home >> All >> org >> apache >> [ xmlrpc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.xmlrpc.XmlRpcClient