回答編集履歴

1

コード修正

2020/02/14 08:07

投稿

jimbe
jimbe

スコア13209

test CHANGED
@@ -32,9 +32,9 @@
32
32
 
33
33
  String urlA = TO_API1 + "request_data1=" + testA + "&request_data2=" + testB;
34
34
 
35
- Future<ResponseA> responseA = es.submit(new XMLAcquirer(urlA, root -> new ResponseA(root)));
35
+ Future<ResponseA> futureA = es.submit(new XMLAcquirer(urlA, root -> new ResponseA(root)));
36
-
36
+
37
- ResponseA resA = responseA.get();
37
+ ResponseA resA = futureA.get();
38
38
 
39
39
 
40
40
 
@@ -42,9 +42,9 @@
42
42
 
43
43
  String urlB = TO_API2 + "api_id=" + API_ID + resA.api_id1 + resA.api_id2 + "&lang=" + LANG;
44
44
 
45
- Future<ResponseB> responseB = es.submit(new XMLAcquirer(urlB, root -> new ResponseB(root)));
45
+ Future<ResponseB> futureB = es.submit(new XMLAcquirer(urlB, root -> new ResponseB(root)));
46
-
46
+
47
- ResponseB resB = responseB.get();
47
+ ResponseB resB = futureB.get();
48
48
 
49
49
 
50
50
 
@@ -52,9 +52,9 @@
52
52
 
53
53
  String urlC = TO_API3 + "request_data1=" + resB.data1 + "&request_data2=" + resB.data2;
54
54
 
55
- Future<ResponseC> responseC = es.submit(new XMLAcquirer(urlC, root -> new ResponseC(root)));
55
+ Future<ResponseC> futureC = es.submit(new XMLAcquirer(urlC, root -> new ResponseC(root)));
56
-
56
+
57
- ResponseC resC = responseC.get();
57
+ ResponseC resC = futureC.get();
58
58
 
59
59
 
60
60
 
@@ -82,6 +82,8 @@
82
82
 
83
83
  }
84
84
 
85
+ //urlA の XML を解析して必要なデータを内部に保持する
86
+
85
87
  static class ResponseA {
86
88
 
87
89
  ResponseA(Element rootElement) {
@@ -114,6 +116,8 @@
114
116
 
115
117
  }
116
118
 
119
+ //urlB の XML を解析して必要なデータを内部に保持する
120
+
117
121
  static class ResponseB {
118
122
 
119
123
  ResponseB(Element rootElement) {
@@ -146,6 +150,8 @@
146
150
 
147
151
  }
148
152
 
153
+ //urlC の XML を解析して必要なデータを内部に保持する
154
+
149
155
  static class ResponseC {
150
156
 
151
157
  ResponseC(Element rootElement) {