Class ElasticClient
- java.lang.Object
-
- org.exoplatform.commons.search.es.client.ElasticClient
-
- Direct Known Subclasses:
ElasticIndexingClient,ElasticSearchingClient
public abstract class ElasticClient extends Object
Created by The eXo Platform SAS Author : Thibault Clement tclement@exoplatform.com 10/16/15
-
-
Field Summary
Fields Modifier and Type Field Description protected ElasticIndexingAuditTrailauditTrailprotected org.apache.http.client.HttpClientclientstatic intDEFAULT_MAX_HTTP_POOL_CONNECTIONSprotected StringurlClient
-
Constructor Summary
Constructors Modifier Constructor Description protectedElasticClient(ElasticIndexingAuditTrail auditTrail)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.apache.http.conn.HttpClientConnectionManagergetClientConnectionManager()protected abstract StringgetEsPasswordProperty()protected abstract StringgetEsUsernameProperty()protected org.apache.http.client.HttpClientgetHttpClient()protected intgetMaxConnections()protected voidinitHttpClient()protected ElasticResponsesendHttpDeleteRequest(String url)protected ElasticResponsesendHttpGetRequest(String url)protected ElasticResponsesendHttpHeadRequest(String url)protected ElasticResponsesendHttpPostRequest(String url, String content)protected ElasticResponsesendHttpPutRequest(String url, String content)
-
-
-
Field Detail
-
DEFAULT_MAX_HTTP_POOL_CONNECTIONS
public static final int DEFAULT_MAX_HTTP_POOL_CONNECTIONS
- See Also:
- Constant Field Values
-
urlClient
protected String urlClient
-
client
protected org.apache.http.client.HttpClient client
-
auditTrail
protected ElasticIndexingAuditTrail auditTrail
-
-
Constructor Detail
-
ElasticClient
protected ElasticClient(ElasticIndexingAuditTrail auditTrail)
-
-
Method Detail
-
sendHttpPostRequest
protected ElasticResponse sendHttpPostRequest(String url, String content)
-
sendHttpPutRequest
protected ElasticResponse sendHttpPutRequest(String url, String content)
-
sendHttpDeleteRequest
protected ElasticResponse sendHttpDeleteRequest(String url)
-
sendHttpGetRequest
protected ElasticResponse sendHttpGetRequest(String url)
-
sendHttpHeadRequest
protected ElasticResponse sendHttpHeadRequest(String url)
-
initHttpClient
protected void initHttpClient()
-
getHttpClient
protected org.apache.http.client.HttpClient getHttpClient()
-
getEsUsernameProperty
protected abstract String getEsUsernameProperty()
-
getEsPasswordProperty
protected abstract String getEsPasswordProperty()
-
getClientConnectionManager
protected abstract org.apache.http.conn.HttpClientConnectionManager getClientConnectionManager()
-
getMaxConnections
protected int getMaxConnections()
-
-