public class HttpClient extends AbstractClient
Constructor and Description |
---|
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 |
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.
|
delete, deleteMetric, getDataPointValueClass, getMetricNames, getTagNames, getTagValues, pushMetrics, query, registerCustomDataType
public HttpClient(String url) throws MalformedURLException
url
- url to KairosDB serverMalformedURLException
protected org.kairosdb.client.ClientResponse postData(String json, String url) throws IOException
postData
in class AbstractClient
IOException
protected org.kairosdb.client.ClientResponse queryData(String url) throws IOException
queryData
in class AbstractClient
IOException
protected org.kairosdb.client.ClientResponse delete(String url) throws IOException
delete
in class AbstractClient
IOException
public void shutdown() throws IOException
Client
IOException
public int getRetryCount()
Client
public void setRetryCount(int retries)
protected void setClient(org.apache.http.impl.client.CloseableHttpClient client)
Copyright © 2014. All rights reserved.