public class HttpClient extends AbstractClient
| Constructor and Description |
|---|
HttpClient(org.apache.http.impl.client.HttpClientBuilder builder,
String url)
Creates a client to talk to the host on the specified port.
|
HttpClient(String url)
Creates a client to talk to the host on the specified port.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.kairosdb.client.ClientResponse |
delete(String url) |
int |
getRetryCount()
Returns the number of retries.
|
protected org.kairosdb.client.ClientResponse |
postCompressedData(String json,
String url) |
protected org.kairosdb.client.ClientResponse |
postData(String json,
String url) |
protected org.kairosdb.client.ClientResponse |
queryData(String url) |
protected void |
setClient(org.apache.http.impl.client.CloseableHttpClient client)
Used for testing only
|
void |
setRetryCount(int retries) |
void |
shutdown()
Shuts down the client.
|
createRollup, delete, deleteMetric, deleteRollup, getDataPointValueClass, getMetricNames, getRollupTask, getRollupTasks, getStatus, getTagNames, getTagValues, pushMetrics, query, queryTag, registerCustomDataTypepublic HttpClient(String url) throws MalformedURLException
url - url to the KairosDB serverMalformedURLException - if url is malformedpublic HttpClient(org.apache.http.impl.client.HttpClientBuilder builder,
String url)
throws MalformedURLException
builder - client builder.url - url to the KairosDB serverMalformedURLException - if the url is malformedprotected org.kairosdb.client.ClientResponse postData(String json, String url) throws IOException
postData in class AbstractClientIOExceptionprotected org.kairosdb.client.ClientResponse postCompressedData(String json, String url) throws IOException
postCompressedData in class AbstractClientIOExceptionprotected org.kairosdb.client.ClientResponse queryData(String url) throws IOException
queryData in class AbstractClientIOExceptionprotected org.kairosdb.client.ClientResponse delete(String url) throws IOException
delete in class AbstractClientIOExceptionpublic void shutdown()
throws IOException
ClientIOException - if could not shutdown the clientpublic int getRetryCount()
Clientpublic void setRetryCount(int retries)
protected void setClient(org.apache.http.impl.client.CloseableHttpClient client)
client - underlying clientCopyright © 2018. All rights reserved.