org.apache.xmlrpc.client
Class XmlRpcClientWorker
java.lang.Object
org.apache.xmlrpc.client.XmlRpcClientWorker
- All Implemented Interfaces:
- org.apache.xmlrpc.common.XmlRpcWorker
public class XmlRpcClientWorker
- extends java.lang.Object
- implements org.apache.xmlrpc.common.XmlRpcWorker
Object, which performs a request on the clients behalf.
The client maintains a pool of workers. The main purpose of the
pool is limitation of the maximum number of concurrent requests.
- Since:
- 3.0
Method Summary |
java.lang.Object |
execute(org.apache.xmlrpc.XmlRpcRequest pRequest)
Performs a synchronous request. |
void |
execute(org.apache.xmlrpc.XmlRpcRequest pRequest,
AsyncCallback pCallback)
Performs an synchronous request. |
org.apache.xmlrpc.common.XmlRpcController |
getController()
|
protected java.lang.Thread |
newThread(java.lang.Runnable pRunnable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
private final XmlRpcClientWorkerFactory factory
XmlRpcClientWorker
public XmlRpcClientWorker(XmlRpcClientWorkerFactory pFactory)
- Creates a new instance.
- Parameters:
pFactory
- The factory, which is being notified, if
the worker's ready.
getController
public org.apache.xmlrpc.common.XmlRpcController getController()
- Specified by:
getController
in interface org.apache.xmlrpc.common.XmlRpcWorker
execute
public java.lang.Object execute(org.apache.xmlrpc.XmlRpcRequest pRequest)
throws org.apache.xmlrpc.XmlRpcException
- Performs a synchronous request.
- Specified by:
execute
in interface org.apache.xmlrpc.common.XmlRpcWorker
- Parameters:
pRequest
- The request being performed.
- Returns:
- The requests result.
- Throws:
org.apache.xmlrpc.XmlRpcException
- Performing the request failed.
newThread
protected java.lang.Thread newThread(java.lang.Runnable pRunnable)
execute
public void execute(org.apache.xmlrpc.XmlRpcRequest pRequest,
AsyncCallback pCallback)
- Performs an synchronous request.
- Parameters:
pRequest
- The request being performed.pCallback
- The callback being invoked, when the request is finished.