Import Java.util.concurrent.countdownlatch;import Org.apache.http.httpresponse;import Org.apache.http.client.config.requestconfig;import Org.apache.http.client.methods.httpget;import Org.apache.http.concurrent.futurecallback;import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; Import org.apache.http.impl.nio.client.HttpAsyncClients; public class Asyncclienthttpexchangefuturecallback {public static void main (final string[] args) throws Exception { Requestconfig requestconfig = Requestconfig.custom (). SetSocketTimeout (in). Setconnecttimeout (+). Build (); Closeablehttpasyncclient httpclient = Httpasyncclients.custom (). Setdefaultrequestconfig (Requestconfig) . build (); try {httpclient.start (); Final httpget[] requests = new httpget[] {new HttpGet ("http://www.apache.org/"), NE W httpget ("https://www.verisign.com/"), New HttpGet ("HTtp://www.googlexxxxxxxxxxxxxxxxxxxxxx.com/")}; Final Countdownlatch latch = new Countdownlatch (requests.length); For (final HttpGet request:requests) {httpclient.execute (Request, New futurecallback Java example of asynchronous execution of multiple HTTP requests (requires Apache HTTP class library)