Examples of AsyncClientHttpRequest


Examples of org.springframework.http.client.AsyncClientHttpRequest

   * @return the created request
   * @throws IOException in case of I/O errors
   */
  protected AsyncClientHttpRequest createAsyncRequest(URI url, HttpMethod method)
      throws IOException {
    AsyncClientHttpRequest request = getAsyncRequestFactory().createAsyncRequest(url, method);
    if (logger.isDebugEnabled()) {
      logger.debug("Created asynchronous " + method.name() + " request for \"" + url + "\"");
    }
    return request;
  }
View Full Code Here

Examples of org.springframework.http.client.AsyncClientHttpRequest

      ResponseExtractor<T> responseExtractor) throws RestClientException {

    Assert.notNull(url, "'url' must not be null");
    Assert.notNull(method, "'method' must not be null");
    try {
      AsyncClientHttpRequest request = createAsyncRequest(url, method);
      if (requestCallback != null) {
        requestCallback.doWithRequest(request);
      }
      ListenableFuture<ClientHttpResponse> responseFuture = request.executeAsync();
      return new ResponseExtractorFuture<T>(method, url, responseFuture, responseExtractor);
    }
    catch (IOException ex) {
      throw new ResourceAccessException("I/O error on " + method.name() +
          " request for \"" + url + "\":" + ex.getMessage(), ex);
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.