本文整理了Java中org.apache.xmlrpc.common.XmlRpcWorkerFactory.releaseWorker()
方法的一些代码示例,展示了XmlRpcWorkerFactory.releaseWorker()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlRpcWorkerFactory.releaseWorker()
方法的具体详情如下:
包路径:org.apache.xmlrpc.common.XmlRpcWorkerFactory
类名称:XmlRpcWorkerFactory
方法名:releaseWorker
[英]Called, when the worker did its job. Frees resources and decrements the number of concurrent requests.
[中]
代码示例来源:origin: rosjava/rosjava_core
/** Performs the given request.
* @param pRequest The request being executed.
* @return The result object.
* @throws XmlRpcException The request failed.
*/
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException {
final XmlRpcWorkerFactory factory = getWorkerFactory();
final XmlRpcWorker worker = factory.getWorker();
try {
return worker.execute(pRequest);
} finally {
factory.releaseWorker(worker);
}
}
}
代码示例来源:origin: org.apache.xmlrpc/xmlrpc-server
/** Performs the given request.
* @param pRequest The request being executed.
* @return The result object.
* @throws XmlRpcException The request failed.
*/
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException {
final XmlRpcWorkerFactory factory = getWorkerFactory();
final XmlRpcWorker worker = factory.getWorker();
try {
return worker.execute(pRequest);
} finally {
factory.releaseWorker(worker);
}
}
}
代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-server
/** Performs the given request.
* @param pRequest The request being executed.
* @return The result object.
* @throws XmlRpcException The request failed.
*/
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException {
final XmlRpcWorkerFactory factory = getWorkerFactory();
final XmlRpcWorker worker = factory.getWorker();
try {
return worker.execute(pRequest);
} finally {
factory.releaseWorker(worker);
}
}
}
代码示例来源:origin: xmlrpc/xmlrpc-client
/** Performs a synchronous request.
* @param pRequest The request being performed.
* @return The requests result.
* @throws XmlRpcException Performing the request failed.
*/
public Object execute(XmlRpcRequest pRequest)
throws XmlRpcException {
try {
XmlRpcClient client = (XmlRpcClient) getController();
return client.getTransportFactory().getTransport().sendRequest(pRequest);
} finally {
factory.releaseWorker(this);
}
}
代码示例来源:origin: xmlrpc/xmlrpc-client
public void run(){
Object result = null;
Throwable th = null;
try {
XmlRpcClient client = (XmlRpcClient) getController();
result = client.getTransportFactory().getTransport().sendRequest(pRequest);
} catch (Throwable t) {
th = t;
}
factory.releaseWorker(XmlRpcClientWorker.this);
if (th == null) {
pCallback.handleResult(pRequest, result);
} else {
pCallback.handleError(pRequest, th);
}
}
};
内容来源于网络,如有侵权,请联系作者删除!