本文整理了Java中org.apache.xmlrpc.common.XmlRpcWorkerFactory.newWorker()
方法的一些代码示例,展示了XmlRpcWorkerFactory.newWorker()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlRpcWorkerFactory.newWorker()
方法的具体详情如下:
包路径:org.apache.xmlrpc.common.XmlRpcWorkerFactory
类名称:XmlRpcWorkerFactory
方法名:newWorker
[英]Creates a new worker instance.
[中]创建一个新的worker实例。
代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-common
/** Returns a worker for synchronous processing.
* @return An instance of {@link XmlRpcWorker}, which is ready
* for use.
* @throws XmlRpcLoadException The clients maximum number of concurrent
* threads is exceeded.
*/
public synchronized XmlRpcWorker getWorker() throws XmlRpcLoadException {
int max = controller.getMaxThreads();
if (max > 0 && numThreads == max) {
throw new XmlRpcLoadException("Maximum number of concurrent requests exceeded: " + max);
}
if (max == 0) {
return singleton;
}
++numThreads;
if (pool.size() == 0) {
return newWorker();
} else {
return (XmlRpcWorker) pool.remove(pool.size() - 1);
}
}
代码示例来源:origin: org.apache.xmlrpc/xmlrpc-common
/** Returns a worker for synchronous processing.
* @return An instance of {@link XmlRpcWorker}, which is ready
* for use.
* @throws XmlRpcLoadException The clients maximum number of concurrent
* threads is exceeded.
*/
public synchronized XmlRpcWorker getWorker() throws XmlRpcLoadException {
int max = controller.getMaxThreads();
if (max > 0 && numThreads == max) {
throw new XmlRpcLoadException("Maximum number of concurrent requests exceeded: " + max);
}
if (max == 0) {
return singleton;
}
++numThreads;
if (pool.size() == 0) {
return newWorker();
} else {
return (XmlRpcWorker) pool.remove(pool.size() - 1);
}
}
代码示例来源:origin: rosjava/rosjava_core
/** Returns a worker for synchronous processing.
* @return An instance of {@link XmlRpcWorker}, which is ready
* for use.
* @throws XmlRpcLoadException The clients maximum number of concurrent
* threads is exceeded.
*/
public synchronized XmlRpcWorker getWorker() throws XmlRpcLoadException {
int max = controller.getMaxThreads();
if (max > 0 && numThreads == max) {
throw new XmlRpcLoadException("Maximum number of concurrent requests exceeded: " + max);
}
if (max == 0) {
return singleton;
}
++numThreads;
if (pool.size() == 0) {
return newWorker();
} else {
return (XmlRpcWorker) pool.remove(pool.size() - 1);
}
}
内容来源于网络,如有侵权,请联系作者删除!