public class RestTestClient
extends java.lang.Object
implements java.io.Closeable
RestClient instance used to send the REST requests.
Holds the RestSpec used to translate api calls into REST calls| Modifier and Type | Field and Description |
|---|---|
static int |
CONNECT_TIMEOUT_MILLIS |
static int |
CONNECTION_REQUEST_TIMEOUT_MILLIS |
static int |
MAX_RETRY_TIMEOUT_MILLIS |
static java.lang.String |
PROTOCOL |
static int |
SOCKET_TIMEOUT_MILLIS |
static java.lang.String |
TRUSTSTORE_PASSWORD |
static java.lang.String |
TRUSTSTORE_PATH |
| Constructor and Description |
|---|
RestTestClient(RestSpec restSpec,
org.elasticsearch.common.settings.Settings settings,
java.net.URL[] urls) |
| Modifier and Type | Method and Description |
|---|---|
RestTestResponse |
callApi(java.lang.String apiName,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String body,
java.util.Map<java.lang.String,java.lang.String> headers)
Calls an api with the provided parameters and body
|
void |
close()
Closes the REST client and the underlying http client
|
org.elasticsearch.Version |
getEsVersion() |
public static final java.lang.String PROTOCOL
public static final java.lang.String TRUSTSTORE_PATH
public static final java.lang.String TRUSTSTORE_PASSWORD
public static final int CONNECT_TIMEOUT_MILLIS
public static final int SOCKET_TIMEOUT_MILLIS
public static final int MAX_RETRY_TIMEOUT_MILLIS
public static final int CONNECTION_REQUEST_TIMEOUT_MILLIS
public RestTestClient(RestSpec restSpec, org.elasticsearch.common.settings.Settings settings, java.net.URL[] urls) throws java.io.IOException
java.io.IOExceptionpublic org.elasticsearch.Version getEsVersion()
public RestTestResponse callApi(java.lang.String apiName, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String body, java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable