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.
execute
public Object execute(String pMethodName,
List pParams)
throws XmlRpcExceptionPerforms a request with the clients default configuration.
pMethodName - The method being performed.pParams - The parameters.
execute
public Object execute(String pMethodName,
Object[] pParams)
throws XmlRpcExceptionPerforms a request with the clients default configuration.
pMethodName - The method being performed.pParams - The parameters.
execute
public Object execute(XmlRpcRequest pRequest)
throws XmlRpcExceptionPerforms a request with the clients default configuration.
pRequest - The request being performed.
execute
public Object execute(XmlRpcClientConfig pConfig,
String pMethodName,
List pParams)
throws XmlRpcExceptionPerforms a request with the given configuration.
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.
execute
public Object execute(XmlRpcClientConfig pConfig,
String pMethodName,
Object[] pParams)
throws XmlRpcExceptionPerforms a request with the given configuration.
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.
executeAsync
public void executeAsync(String pMethodName,
List pParams,
AsyncCallback pCallback)
throws XmlRpcExceptionPerforms an asynchronous request with the clients default configuration.
pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
executeAsync
public void executeAsync(String pMethodName,
Object[] pParams,
AsyncCallback pCallback)
throws XmlRpcExceptionPerforms an asynchronous request with the clients default configuration.
pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
executeAsync
public void executeAsync(XmlRpcRequest pRequest,
AsyncCallback pCallback)
throws XmlRpcExceptionPerforms a request with the clients default configuration.
pRequest - The request being performed.pCallback - The callback being notified when the request is finished.
executeAsync
public void executeAsync(XmlRpcClientConfig pConfig,
String pMethodName,
List pParams,
AsyncCallback pCallback)
throws XmlRpcExceptionPerforms an asynchronous request with the given configuration.
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
executeAsync
public void executeAsync(XmlRpcClientConfig pConfig,
String pMethodName,
Object[] pParams,
AsyncCallback pCallback)
throws XmlRpcExceptionPerforms an asynchronous request with the given configuration.
pConfig - The request configuration.pMethodName - The method being performed.pParams - The parameters.pCallback - The callback being notified when the request is finished.
getClientConfig
public XmlRpcClientConfig getClientConfig()
- The default request configuration.
getXmlWriterFactory
public XmlWriterFactory getXmlWriterFactory()
- A factory for creating instances of
org.apache.ws.commons.serialize.XMLWriter.
setConfig
public void setConfig(XmlRpcClientConfig pConfig)
pConfig - The default request configuration.
setTransportFactory
public void setTransportFactory(XmlRpcTransportFactory pFactory)
pFactory - The clients transport factory.
setXmlWriterFactory
public void setXmlWriterFactory(XmlWriterFactory pFactory)
pFactory - A factory for creating instances of
org.apache.ws.commons.serialize.XMLWriter.