【发布时间】:2019-10-29 04:48:57
【问题描述】:
我想让我的soap请求调用在java中并行。 我是多线程的新手,没有办法做到这一点。
public List<TB600Model.Response> getTableDesc(final List<TB600Model.Request> requests)
{
List<TB600Model.Response> responses = new ArrayList<>();
for (TB600Model.Request request : requests)
{
responses.add(
this.modifyDescription(
this.getDescription(
request.getSite()
,request.getDescType()
,request.getKeyData()
,request.getEffMdy()
)
,request.getDescType()
,request.getKeyData()
)
);
}
return responses;
}
【问题讨论】:
-
尝试编辑您的问题并以正确的形式发送,为您的代码使用“代码标签”
-
@Mehdi 更新了代码,知道如何让调用并行运行,这会影响我的应用程序的性能。
-
这段代码还没有发送任何soap调用,它只是将响应信息保存在一个数组列表中。把发送部分,我告诉你怎么写并行
-
代码getDescription中的部分是调用客户端。
-
添加了代码图片
标签: java spring multithreading soap