Package com.ning.http.client.AsyncHttpClient

Examples of com.ning.http.client.AsyncHttpClient.BoundRequestBuilder.execute()


            sender = getSender();

            // Construct and submit NING Request
            BoundRequestBuilder request = createRequest();
            // String targetUrl = request.build().getUrl();
            request.execute(new HttpAsyncHandler(this));

            timeoutDuration = Duration
                .create(VarUtils.ACTOR_MAX_OPERATION_TIME_SECONDS_DEFAULT,
                    TimeUnit.SECONDS);
View Full Code Here


              BasicDBObject cachedVal = this.getCache(url, endpoint);
              requestOverview.cachedResult = cachedVal;
              requestOverview.cachedDoc_expired = cachedDoc_expired;
             
              if (null == cachedVal) {
                requestOverview.responseFuture = asyncRequest.execute();           
              }         
              else {
                //DEBUG
                if (_DEBUG) _logger.debug("DEB: preQA6b: Cache: " + url + " , " + cachedVal);
               
View Full Code Here

    } catch (JsonProcessingException e) {
      throw Throwables.propagate(e);
    }

    try {
      postRequest.execute(handler);
    } catch (IOException e) {
      LOG.warn("Couldn't execute webhook to {}", webhook.getUri(), e);

      if (handler.shouldDeleteUpdateDueToQueueAboveCapacity()) {
        handler.deleteWebhookUpdate();
View Full Code Here

  public ListenableFuture<String> get(final String url) {
    final BoundRequestBuilder getter = client.prepareGet(url);
    mergeCookies(getter);
    try {
      ListenableFuture<String> executing = getter.execute(new AsyncCompletionHandler<String>() {

        @Override
        public String onCompleted(Response asyncResponse) throws Exception {
          logger.debug("Receiving response from url {}", url);
          String htmlContent = asyncResponse.getResponseBody();
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.