Package com.ning.http.client

Examples of com.ning.http.client.AsyncHttpClientConfigBean


    AsyncHttpClient fastClient = null;
    AsyncHttpClient slowClient = null;

    try {
      // create and configure async http client
      AsyncHttpClientConfigBean configFastClient = new AsyncHttpClientConfigBean();
      configFastClient.setConnectionTimeOutInMs(VarUtils.NING_FASTCLIENT_CONNECTION_TIMEOUT_MS);
      configFastClient.setRequestTimeoutInMs(VarUtils.NING_FASTCLIENT_REQUEST_TIMEOUT_MS);
      fastClient = new AsyncHttpClient(configFastClient);
     
      AsyncHttpClientConfigBean configSlowClient = new AsyncHttpClientConfigBean();
      configSlowClient.setConnectionTimeOutInMs(VarUtils.NING_SLOWCLIENT_CONNECTION_TIMEOUT_MS);
      configSlowClient.setRequestTimeoutInMs(VarUtils.NING_SLOWCLIENT_REQUEST_TIMEOUT_MS);
      slowClient = new AsyncHttpClient(configSlowClient);
     
      disableCertificateVerification();
    } catch (Exception e) {
      models.utils.LogUtils.printLogError("ERROR IN AsyncHttpClientFactorySafe " +e.getLocalizedMessage());
View Full Code Here

TOP

Related Classes of com.ning.http.client.AsyncHttpClientConfigBean

Copyright © 2018 www.massapicom. 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.