Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
modified getAsyncClient to return CloseableHttpAsyncClient instance - f…
Browse files Browse the repository at this point in the history
…ixes #111
  • Loading branch information
Cihat Keser committed Mar 22, 2014
1 parent a60aa97 commit 692cb54
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions jest/src/main/java/io/searchbox/client/http/JestHttpClient.java
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
package io.searchbox.client.http;


import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import io.searchbox.Action;
import io.searchbox.client.AbstractJestClient;
import io.searchbox.client.JestClient;
import io.searchbox.client.JestResult;
import io.searchbox.client.JestResultHandler;
import io.searchbox.client.http.apache.HttpDeleteWithEntity;
import io.searchbox.client.http.apache.HttpGetWithEntity;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.Map.Entry;
import java.util.concurrent.ExecutionException;

import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.StatusLine;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.methods.*;
import org.apache.http.concurrent.FutureCallback;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import org.apache.http.nio.client.HttpAsyncClient;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.Map.Entry;
import java.util.concurrent.ExecutionException;


/**
Expand Down Expand Up @@ -197,7 +190,7 @@ public void setHttpClient(CloseableHttpClient httpClient) {
this.httpClient = httpClient;
}

public HttpAsyncClient getAsyncClient() {
public CloseableHttpAsyncClient getAsyncClient() {
return asyncClient;
}

Expand Down

0 comments on commit 692cb54

Please sign in to comment.