public abstract class AbstractAction<T extends JestResult> extends Object implements Action<T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractAction.Builder<T extends Action,K> |
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARSET |
protected String |
indexName |
protected static org.slf4j.Logger |
log |
protected String |
nodes |
protected Object |
payload |
protected String |
typeName |
| Constructor and Description |
|---|
AbstractAction() |
AbstractAction(AbstractAction.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildQueryString() |
protected String |
buildURI() |
protected T |
createNewElasticSearchResult(T result,
String responseBody,
int statusCode,
String reasonPhrase,
com.google.gson.Gson gson) |
boolean |
equals(Object obj) |
String |
getData(com.google.gson.Gson gson) |
Object |
getHeader(String header) |
Map<String,Object> |
getHeaders() |
static String |
getIdFromSource(Object source) |
Collection<Object> |
getParameter(String parameter) |
String |
getPathToResult() |
abstract String |
getRestMethodName() |
String |
getURI() |
int |
hashCode() |
protected boolean |
isHttpSuccessful(int httpCode) |
protected com.google.gson.JsonObject |
parseResponseBody(String responseBody) |
protected void |
setURI(String URI) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateNewElasticSearchResultpublic static String CHARSET
protected static final org.slf4j.Logger log
protected String indexName
protected String typeName
protected String nodes
protected Object payload
public AbstractAction()
public AbstractAction(AbstractAction.Builder builder)
protected T createNewElasticSearchResult(T result, String responseBody, int statusCode, String reasonPhrase, com.google.gson.Gson gson)
protected boolean isHttpSuccessful(int httpCode)
protected com.google.gson.JsonObject parseResponseBody(String responseBody)
public Collection<Object> getParameter(String parameter)
public Map<String,Object> getHeaders()
getHeaders in interface Action<T extends JestResult>public String getURI()
getURI in interface Action<T extends JestResult>protected void setURI(String URI)
public String getData(com.google.gson.Gson gson)
getData in interface Action<T extends JestResult>public String getPathToResult()
getPathToResult in interface Action<T extends JestResult>protected String buildURI()
protected String buildQueryString() throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic abstract String getRestMethodName()
getRestMethodName in interface Action<T extends JestResult>Copyright © 2017. All rights reserved.