public class ElasticSearchConnection extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ElasticSearchConnection.CallThread |
static class |
ElasticSearchConnection.Result |
Modifier and Type | Field and Description |
---|---|
protected ElasticSearchConfig |
config |
protected static String |
jsonException |
Modifier | Constructor and Description |
---|---|
protected |
ElasticSearchConnection(ElasticSearchConfig config,
org.apache.http.client.HttpClient client) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
call(org.apache.http.client.methods.HttpRequestBase method)
Call ElasticSearch.
|
protected String |
checkJson(String jsonQuery) |
protected StringBuffer |
getApiUrl(String command,
boolean checkConnection) |
String |
getCallUrlSnippet() |
protected String |
getResponse() |
ElasticSearchConnection.Result |
getResult() |
String |
getResultCode() |
String |
getResultDescription() |
protected void |
handleHttpException(org.apache.http.HttpException e) |
protected void |
handleIOException(IOException e) |
protected boolean |
handleResultCode(int code,
String response) |
protected void |
setResult(String resultCode,
ElasticSearchConnection.Result res,
String desc) |
void |
setResultCode(String resultCode) |
protected ElasticSearchConfig config
protected static final String jsonException
protected ElasticSearchConnection(ElasticSearchConfig config, org.apache.http.client.HttpClient client)
protected StringBuffer getApiUrl(String command, boolean checkConnection) throws ManifoldCFException
ManifoldCFException
protected boolean call(org.apache.http.client.methods.HttpRequestBase method) throws ManifoldCFException, ServiceInterruption
ManifoldCFException
ServiceInterruption
protected boolean handleResultCode(int code, String response) throws ManifoldCFException, ServiceInterruption
protected void handleHttpException(org.apache.http.HttpException e) throws ManifoldCFException, ServiceInterruption
protected void handleIOException(IOException e) throws ManifoldCFException, ServiceInterruption
protected String checkJson(String jsonQuery) throws ManifoldCFException
ManifoldCFException
protected void setResult(String resultCode, ElasticSearchConnection.Result res, String desc)
public String getResultDescription()
protected String getResponse()
public ElasticSearchConnection.Result getResult()
public String getCallUrlSnippet()
public String getResultCode()
public void setResultCode(String resultCode)