org.apache.xmlrpc.client
public class XmlRpcClient extends XmlRpcController
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 {@link org.apache.xmlrpc.client.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 {@link #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.
Since: 3.0
Method Summary | |
---|---|
Object | execute(String pMethodName, Object[] pParams) Performs a request with the clients default configuration. |
Object | execute(XmlRpcClientConfig pConfig, String pMethodName, Object[] pParams) Performs a request with the given configuration. |
Object | execute(String pMethodName, List pParams) Performs a request with the clients default configuration. |
Object | execute(XmlRpcClientConfig pConfig, String pMethodName, List pParams) Performs a request with the given configuration. |
Object | execute(XmlRpcRequest pRequest) Performs a request with the clients default configuration. |
void | executeAsync(String pMethodName, Object[] pParams, AsyncCallback pCallback) Performs an asynchronous request with the clients default configuration. |
void | executeAsync(XmlRpcClientConfig pConfig, String pMethodName, Object[] pParams, AsyncCallback pCallback) Performs an asynchronous request with the given configuration. |
void | executeAsync(String pMethodName, List pParams, AsyncCallback pCallback) Performs an asynchronous request with the clients default configuration. |
void | executeAsync(XmlRpcClientConfig pConfig, String pMethodName, List pParams, AsyncCallback pCallback) Performs an asynchronous request with the given configuration. |
void | executeAsync(XmlRpcRequest pRequest, AsyncCallback pCallback) Performs a request with the clients default configuration. |
XmlRpcClientConfig | getClientConfig() Returns the clients default configuration. |
XmlRpcConfig | getConfig() Returns the clients default configuration. |
protected XmlRpcWorkerFactory | getDefaultXmlRpcWorkerFactory() |
XmlRpcTransportFactory | getTransportFactory() Returns the clients transport factory. |
XmlWriterFactory | getXmlWriterFactory() Returns the clients instance of
{@link org.apache.xmlrpc.serializer.XmlWriterFactory}. |
void | setConfig(XmlRpcClientConfig pConfig) Sets the clients default configuration. |
void | setTransportFactory(XmlRpcTransportFactory pFactory) Sets the clients transport factory. |
void | setXmlWriterFactory(XmlWriterFactory pFactory) Sets the clients instance of
{@link org.apache.xmlrpc.serializer.XmlWriterFactory}. |
Parameters: pMethodName The method being performed. pParams The parameters.
Returns: The result object.
Throws: XmlRpcException Performing the request failed.
Parameters: pConfig The request configuration. pMethodName The method being performed. pParams The parameters.
Returns: The result object.
Throws: XmlRpcException Performing the request failed.
Parameters: pMethodName The method being performed. pParams The parameters.
Returns: The result object.
Throws: XmlRpcException Performing the request failed.
Parameters: pConfig The request configuration. pMethodName The method being performed. pParams The parameters.
Returns: The result object.
Throws: XmlRpcException Performing the request failed.
Parameters: pRequest The request being performed.
Returns: The result object.
Throws: XmlRpcException Performing the request failed.
Parameters: pMethodName The method being performed. pParams The parameters. pCallback The callback being notified when the request is finished.
Throws: XmlRpcException Performing the request failed.
Parameters: pConfig The request configuration. pMethodName The method being performed. pParams The parameters. pCallback The callback being notified when the request is finished.
Throws: XmlRpcException Performing the request failed.
Parameters: pMethodName The method being performed. pParams The parameters. pCallback The callback being notified when the request is finished.
Throws: XmlRpcException Performing the request failed.
Parameters: pConfig The request configuration. pMethodName The method being performed. pParams The parameters. pCallback The callback being notified when the request is finished.
Throws: XmlRpcException Performing the request failed.
Parameters: pRequest The request being performed. pCallback The callback being notified when the request is finished.
Throws: XmlRpcException Performing the request failed.
(XmlRpcClientConfig) getConfig()
.
This configuration is used by the methods
{@link #execute(String, List)},
{@link #execute(String, Object[])}.
You may overwrite this per request by using
{@link #execute(XmlRpcClientConfig, String, List)}, or
{@link #execute(XmlRpcClientConfig, String, Object[])}Returns: The default request configuration.
Returns: The default request configuration.
Returns: The clients transport factory.
Returns: A factory for creating instances of {@link org.apache.ws.commons.serialize.XMLWriter}.
Parameters: pConfig The default request configuration.
Parameters: pFactory The clients transport factory.
Parameters: pFactory A factory for creating instances of {@link org.apache.ws.commons.serialize.XMLWriter}.