public class ElasticSearchConnection
extends java.lang.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 java.lang.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 java.lang.String |
checkJson(java.lang.String jsonQuery) |
protected java.lang.StringBuffer |
getApiUrl(java.lang.String command,
boolean checkConnection) |
java.lang.String |
getCallUrlSnippet() |
protected java.lang.String |
getResponse() |
ElasticSearchConnection.Result |
getResult() |
java.lang.String |
getResultCode() |
java.lang.String |
getResultDescription() |
protected void |
handleHttpException(org.apache.http.HttpException e) |
protected void |
handleIOException(java.io.IOException e) |
protected boolean |
handleResultCode(int code,
java.lang.String response) |
protected void |
setResult(java.lang.String resultCode,
ElasticSearchConnection.Result res,
java.lang.String desc) |
void |
setResultCode(java.lang.String resultCode) |
protected final ElasticSearchConfig config
protected static final java.lang.String jsonException
protected ElasticSearchConnection(ElasticSearchConfig config, org.apache.http.client.HttpClient client)
protected java.lang.StringBuffer getApiUrl(java.lang.String command,
boolean checkConnection)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected boolean call(org.apache.http.client.methods.HttpRequestBase method)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected boolean handleResultCode(int code,
java.lang.String response)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected void handleHttpException(org.apache.http.HttpException e)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected void handleIOException(java.io.IOException e)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected java.lang.String checkJson(java.lang.String jsonQuery)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected void setResult(java.lang.String resultCode,
ElasticSearchConnection.Result res,
java.lang.String desc)
public java.lang.String getResultDescription()
protected java.lang.String getResponse()
public ElasticSearchConnection.Result getResult()
public java.lang.String getCallUrlSnippet()
public java.lang.String getResultCode()
public void setResultCode(java.lang.String resultCode)