Public Member Functions | |
XmlRpcController | getController () |
synchronized int | getCurrentRequests () |
synchronized XmlRpcWorker | getWorker () throws XmlRpcLoadException |
synchronized void | releaseWorker (XmlRpcWorker pWorker) |
XmlRpcWorkerFactory (XmlRpcController pController) | |
Protected Member Functions | |
abstract XmlRpcWorker | newWorker () |
Private Attributes | |
final XmlRpcController | controller |
int | numThreads |
final List | pool = new ArrayList() |
final XmlRpcWorker | singleton = newWorker() |
A factory for XmlRpcWorker instances.
Definition at line 27 of file XmlRpcWorkerFactory.java.
org.apache.xmlrpc.common.XmlRpcWorkerFactory.XmlRpcWorkerFactory | ( | XmlRpcController | pController | ) | [inline] |
Creates a new instance.
pController | The client controlling the factory. |
Definition at line 36 of file XmlRpcWorkerFactory.java.
Returns the factory controller.
Definition at line 50 of file XmlRpcWorkerFactory.java.
synchronized int org.apache.xmlrpc.common.XmlRpcWorkerFactory.getCurrentRequests | ( | ) | [inline] |
Returns the number of currently running requests.
Definition at line 95 of file XmlRpcWorkerFactory.java.
synchronized XmlRpcWorker org.apache.xmlrpc.common.XmlRpcWorkerFactory.getWorker | ( | ) | throws XmlRpcLoadException [inline] |
Returns a worker for synchronous processing.
XmlRpcLoadException | The clients maximum number of concurrent threads is exceeded. |
Definition at line 60 of file XmlRpcWorkerFactory.java.
abstract XmlRpcWorker org.apache.xmlrpc.common.XmlRpcWorkerFactory.newWorker | ( | ) | [protected, pure virtual] |
Creates a new worker instance.
Implemented in org.apache.xmlrpc.client.XmlRpcClientWorkerFactory, and org.apache.xmlrpc.server.XmlRpcServerWorkerFactory.
synchronized void org.apache.xmlrpc.common.XmlRpcWorkerFactory.releaseWorker | ( | XmlRpcWorker | pWorker | ) | [inline] |
Called, when the worker did its job. Frees resources and decrements the number of concurrent requests.
pWorker | The worker being released. |
Definition at line 80 of file XmlRpcWorkerFactory.java.
Definition at line 29 of file XmlRpcWorkerFactory.java.
int org.apache.xmlrpc.common.XmlRpcWorkerFactory.numThreads [private] |
Definition at line 31 of file XmlRpcWorkerFactory.java.
final List org.apache.xmlrpc.common.XmlRpcWorkerFactory.pool = new ArrayList() [private] |
Definition at line 30 of file XmlRpcWorkerFactory.java.
final XmlRpcWorker org.apache.xmlrpc.common.XmlRpcWorkerFactory.singleton = newWorker() [private] |
Definition at line 28 of file XmlRpcWorkerFactory.java.