|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xmlrpc.common.XmlRpcController
org.apache.xmlrpc.client.XmlRpcClient
public class XmlRpcClient
The main access point of an XML-RPC client. This object serves mainly
as an object factory. It is designed with singletons in mind: Basically,
an application should be able to hold a single instance of
XmlRpcClient in a static variable, unless you would be
working with different factories.
Until Apache XML-RPC 2.0, this object was used both as an object
factory and as a place, where configuration details (server URL,
suggested encoding, user credentials and the like) have been stored.
In Apache XML-RPC 3.0, the configuration details has been moved to
the XmlRpcClientConfig object.
The configuration object is designed for being passed through the
actual worker methods.
A configured XmlRpcClient object is thread safe: In other words,
the suggested use is, that you configure the client using
setTransportFactory(XmlRpcTransportFactory) and similar
methods, store it in a field and never modify it again. Without
modifications, the client may be used for an arbitrary number
of concurrent requests.
| Constructor Summary | |
|---|---|
XmlRpcClient()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
execute(java.lang.String pMethodName,
java.util.List pParams)
Performs a request with the clients default configuration. |
java.lang.Object |
execute(java.lang.String pMethodName,
java.lang.Object[] pParams)
Performs a request with the clients default configuration. |
java.lang.Object |
execute(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.util.List pParams)
Performs a request with the given configuration. |
java.lang.Object |
execute(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.lang.Object[] pParams)
Performs a request with the given configuration. |
java.lang.Object |
execute(org.apache.xmlrpc.XmlRpcRequest pRequest)
Performs a request with the clients default configuration. |
void |
executeAsync(java.lang.String pMethodName,
java.util.List pParams,
AsyncCallback pCallback)
Performs an asynchronous request with the clients default configuration. |
void |
executeAsync(java.lang.String pMethodName,
java.lang.Object[] pParams,
AsyncCallback pCallback)
Performs an asynchronous request with the clients default configuration. |
void |
executeAsync(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.util.List pParams,
AsyncCallback pCallback)
Performs an asynchronous request with the given configuration. |
void |
executeAsync(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.lang.Object[] pParams,
AsyncCallback pCallback)
Performs an asynchronous request with the given configuration. |
void |
executeAsync(org.apache.xmlrpc.XmlRpcRequest pRequest,
AsyncCallback pCallback)
Performs a request with the clients default configuration. |
XmlRpcClientConfig |
getClientConfig()
Returns the clients default configuration. |
org.apache.xmlrpc.XmlRpcConfig |
getConfig()
Returns the clients default configuration. |
protected org.apache.xmlrpc.common.XmlRpcWorkerFactory |
getDefaultXmlRpcWorkerFactory()
|
XmlRpcTransportFactory |
getTransportFactory()
Returns the clients transport factory. |
org.apache.xmlrpc.serializer.XmlWriterFactory |
getXmlWriterFactory()
Returns the clients instance of XmlWriterFactory. |
void |
setConfig(XmlRpcClientConfig pConfig)
Sets the clients default configuration. |
void |
setTransportFactory(XmlRpcTransportFactory pFactory)
Sets the clients transport factory. |
void |
setXmlWriterFactory(org.apache.xmlrpc.serializer.XmlWriterFactory pFactory)
Sets the clients instance of XmlWriterFactory. |
| Methods inherited from class org.apache.xmlrpc.common.XmlRpcController |
|---|
getMaxThreads, getTypeFactory, getWorkerFactory, setMaxThreads, setTypeFactory, setWorkerFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlRpcClient()
| Method Detail |
|---|
protected org.apache.xmlrpc.common.XmlRpcWorkerFactory getDefaultXmlRpcWorkerFactory()
getDefaultXmlRpcWorkerFactory in class org.apache.xmlrpc.common.XmlRpcControllerpublic void setConfig(XmlRpcClientConfig pConfig)
execute(String, List),
execute(String, Object[]), and
execute(XmlRpcRequest).
You may overwrite this per request by using
execute(XmlRpcClientConfig, String, List),
or execute(XmlRpcClientConfig, String, Object[]).
pConfig - The default request configuration.public org.apache.xmlrpc.XmlRpcConfig getConfig()
execute(String, List),
execute(String, Object[]).
You may overwrite this per request by using
execute(XmlRpcClientConfig, String, List),
or execute(XmlRpcClientConfig, String, Object[]).
getConfig in class org.apache.xmlrpc.common.XmlRpcControllerpublic XmlRpcClientConfig getClientConfig()
(XmlRpcClientConfig) getConfig().
This configuration is used by the methods
execute(String, List),
execute(String, Object[]).
You may overwrite this per request by using
execute(XmlRpcClientConfig, String, List), or
execute(XmlRpcClientConfig, String, Object[])
public void setTransportFactory(XmlRpcTransportFactory pFactory)
XmlRpcTransportFactory.getTransport()
for any request.
pFactory - The clients transport factory.public XmlRpcTransportFactory getTransportFactory()
XmlRpcTransportFactory.getTransport()
for any request.
public java.lang.Object execute(java.lang.String pMethodName,
java.lang.Object[] pParams)
throws org.apache.xmlrpc.XmlRpcException
pMethodName - The method being performed.pParams - The parameters.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public java.lang.Object execute(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.lang.Object[] pParams)
throws org.apache.xmlrpc.XmlRpcException
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public java.lang.Object execute(java.lang.String pMethodName,
java.util.List pParams)
throws org.apache.xmlrpc.XmlRpcException
pMethodName - The method being performed.pParams - The parameters.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public java.lang.Object execute(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.util.List pParams)
throws org.apache.xmlrpc.XmlRpcException
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public java.lang.Object execute(org.apache.xmlrpc.XmlRpcRequest pRequest)
throws org.apache.xmlrpc.XmlRpcException
pRequest - The request being performed.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public void executeAsync(java.lang.String pMethodName,
java.lang.Object[] pParams,
AsyncCallback pCallback)
throws org.apache.xmlrpc.XmlRpcException
pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public void executeAsync(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.lang.Object[] pParams,
AsyncCallback pCallback)
throws org.apache.xmlrpc.XmlRpcException
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public void executeAsync(java.lang.String pMethodName,
java.util.List pParams,
AsyncCallback pCallback)
throws org.apache.xmlrpc.XmlRpcException
pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public void executeAsync(XmlRpcClientConfig pConfig,
java.lang.String pMethodName,
java.util.List pParams,
AsyncCallback pCallback)
throws org.apache.xmlrpc.XmlRpcException
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.
public void executeAsync(org.apache.xmlrpc.XmlRpcRequest pRequest,
AsyncCallback pCallback)
throws org.apache.xmlrpc.XmlRpcException
pRequest - The request being performed.pCallback - The callback being notified when the request is finished.
org.apache.xmlrpc.XmlRpcException - Performing the request failed.public org.apache.xmlrpc.serializer.XmlWriterFactory getXmlWriterFactory()
XmlWriterFactory.
org.apache.ws.commons.serialize.XMLWriter.public void setXmlWriterFactory(org.apache.xmlrpc.serializer.XmlWriterFactory pFactory)
XmlWriterFactory.
pFactory - A factory for creating instances of
org.apache.ws.commons.serialize.XMLWriter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||