org.apache.xmlrpc.client

Class XmlRpcClientWorker

Implemented Interfaces:
XmlRpcWorker

public class XmlRpcClientWorker
extends java.lang.Object
implements 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

Constructor Summary

XmlRpcClientWorker(XmlRpcClientWorkerFactory pFactory)
Creates a new instance.

Method Summary

Object
execute(XmlRpcRequest pRequest)
Performs a synchronous request.
void
execute(XmlRpcRequest pRequest, AsyncCallback pCallback)
Performs an synchronous request.
XmlRpcController
getController()
protected Thread
newThread(Runnable pRunnable)

Constructor Details

XmlRpcClientWorker

public XmlRpcClientWorker(XmlRpcClientWorkerFactory pFactory)
Creates a new instance.
Parameters:
pFactory - The factory, which is being notified, if the worker's ready.

Method Details

execute

public Object execute(XmlRpcRequest pRequest)
            throws XmlRpcException
Performs a synchronous request.
Specified by:
execute in interface XmlRpcWorker
Parameters:
pRequest - The request being performed.
Returns:
The requests result.
Throws:
XmlRpcException - Performing the request failed.

execute

public void execute(XmlRpcRequest pRequest,
                    AsyncCallback pCallback)
Performs an synchronous request.
Parameters:
pRequest - The request being performed.
pCallback - The callback being invoked, when the request is finished.

getController

public XmlRpcController getController()
Specified by:
getController in interface XmlRpcWorker

newThread

protected Thread newThread(Runnable pRunnable)

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.