Examples of AsyncIdleConnectionMonitorThread


Examples of com.mashape.unirest.http.async.utils.AsyncIdleConnectionMonitorThread

      throw new RuntimeException(e);
    }
   
    CloseableHttpAsyncClient asyncClient = HttpAsyncClientBuilder.create().setDefaultRequestConfig(clientConfig).setConnectionManager(asyncConnectionManager).build();
    setOption(Option.ASYNCHTTPCLIENT, asyncClient);
    setOption(Option.ASYNC_MONITOR, new AsyncIdleConnectionMonitorThread(asyncConnectionManager));
  }
View Full Code Here

Examples of com.mashape.unirest.http.async.utils.AsyncIdleConnectionMonitorThread

    HttpUriRequest requestObj = prepareRequest(request, true);

    CloseableHttpAsyncClient asyncHttpClient = ClientFactory.getAsyncHttpClient();
    if (!asyncHttpClient.isRunning()) {
      asyncHttpClient.start();
      AsyncIdleConnectionMonitorThread asyncIdleConnectionMonitorThread = (AsyncIdleConnectionMonitorThread) Options.getOption(Option.ASYNC_MONITOR);
      asyncIdleConnectionMonitorThread.start();
    }

    final Future<org.apache.http.HttpResponse> future = asyncHttpClient.execute(requestObj,
        prepareCallback(responseClass, callback));
View Full Code Here

Examples of com.mashape.unirest.http.async.utils.AsyncIdleConnectionMonitorThread

    CloseableHttpAsyncClient asyncClient = (CloseableHttpAsyncClient) Options.getOption(Option.ASYNCHTTPCLIENT);
    if (asyncClient != null && asyncClient.isRunning()) {
      asyncClient.close();
    }
   
    AsyncIdleConnectionMonitorThread asyncMonitorThread = (AsyncIdleConnectionMonitorThread) Options.getOption(Option.ASYNC_MONITOR);
    if (asyncMonitorThread != null) {
      asyncMonitorThread.interrupt();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.