public class JestHttpClient extends AbstractJestClient implements JestClient
| Modifier and Type | Class and Description |
|---|---|
protected class |
JestHttpClient.DefaultCallback<T extends JestResult> |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.entity.ContentType |
requestContentType |
ELASTIC_SEARCH_DATE_FORMAT, gson| Constructor and Description |
|---|
JestHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.client.methods.HttpUriRequest |
constructHttpMethod(String methodName,
String url,
String payload) |
<T extends JestResult> |
execute(Action<T> clientRequest) |
<T extends JestResult> |
executeAsync(Action<T> clientRequest,
JestResultHandler<T> resultHandler) |
org.apache.http.impl.nio.client.CloseableHttpAsyncClient |
getAsyncClient() |
com.google.gson.Gson |
getGson() |
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient() |
protected <T extends JestResult> |
prepareRequest(Action<T> clientRequest) |
void |
setAsyncClient(org.apache.http.impl.nio.client.CloseableHttpAsyncClient asyncClient) |
void |
setGson(com.google.gson.Gson gson) |
void |
setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
void |
shutdownClient() |
getNextServer, getRequestURL, getServerPoolSize, isRequestCompressionEnabled, setIdleConnectionReaper, setNodeChecker, setRequestCompressionEnabled, setServersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetServerspublic <T extends JestResult> T execute(Action<T> clientRequest) throws IOException
execute in interface JestClientIOException - in case of a problem or the connection was aborted during request,
or in case of a problem while reading the response streampublic <T extends JestResult> void executeAsync(Action<T> clientRequest, JestResultHandler<T> resultHandler)
executeAsync in interface JestClientpublic void shutdownClient()
shutdownClient in interface JestClientshutdownClient in class AbstractJestClientprotected <T extends JestResult> org.apache.http.client.methods.HttpUriRequest prepareRequest(Action<T> clientRequest)
protected org.apache.http.client.methods.HttpUriRequest constructHttpMethod(String methodName, String url, String payload)
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
public org.apache.http.impl.nio.client.CloseableHttpAsyncClient getAsyncClient()
public void setAsyncClient(org.apache.http.impl.nio.client.CloseableHttpAsyncClient asyncClient)
public com.google.gson.Gson getGson()
public void setGson(com.google.gson.Gson gson)
Copyright © 2015. All rights reserved.