forked from PacktPublishing/Java-Coding-Problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
38 lines (28 loc) · 1.36 KB
/
Copy pathMain.java
File metadata and controls
38 lines (28 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package modern.challenge;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.concurrent.ExecutionException;
import java.util.logging.Logger;
public class Main {
private static final Logger logger = Logger.getLogger(Main.class.getName());
public static void main(String[] args)
throws IOException, InterruptedException, ExecutionException, URISyntaxException {
// trigger a sync request
// logger.info("Trigger a sync request...");
// SyncRequest sync = new SyncRequest();
// sync.triggerSyncRequest();
// Trigger async requests
// logger.info("Trigger async request 1...");
// AsyncOneRequest1 async1 = new AsyncOneRequest1();
// async1.triggerOneAyncRequest();
// logger.info("Trigger async request 2...");
// AsyncOneRequest2 async2 = new AsyncOneRequest2();
// async2.triggerOneAyncRequest();
// logger.info("Wait all responses and display bodies on console ...");
// WaitAllResponsesDisplayBodies responses = new WaitAllResponsesDisplayBodies();
// responses.waitAllResponses();
logger.info("Wait all responses and fetch bodies in a List ...");
WaitAllResponsesFetchBodiesInList responses = new WaitAllResponsesFetchBodiesInList();
responses.waitAllResponses();
}
}