@ExternalHealthCheck public class ExternalServiceHealthCheck extends com.codahale.metrics.health.HealthCheck
Constructor and Description |
---|
ExternalServiceHealthCheck(java.lang.String url,
int timeoutMillis) |
ExternalServiceHealthCheck(java.lang.String url,
int timeoutMillis,
OpenConnectionFunction openConnection) |
ExternalServiceHealthCheck(java.lang.String requestMethod,
java.lang.String url,
int timeoutMillis) |
ExternalServiceHealthCheck(java.lang.String requestMethod,
java.lang.String url,
int timeoutMillis,
OpenConnectionFunction openConnection) |
Modifier and Type | Method and Description |
---|---|
com.codahale.metrics.health.HealthCheck.Result |
check() |
public ExternalServiceHealthCheck(java.lang.String url, int timeoutMillis)
url
- the URL that is requested using GET
timeoutMillis
- the timeout for establishing the connection and waiting for datapublic ExternalServiceHealthCheck(java.lang.String requestMethod, java.lang.String url, int timeoutMillis)
requestMethod
- the method to use for the check request, GET
and HEAD
are
allowed valuesurl
- the URL that is requested using GET
timeoutMillis
- the timeout for establishing the connection and waiting for datapublic ExternalServiceHealthCheck(java.lang.String url, int timeoutMillis, OpenConnectionFunction openConnection)
url
- the URL that is requested using GET
timeoutMillis
- the timeout for establishing the connection and waiting for dataopenConnection
- provider of the HttpURLConnection
public ExternalServiceHealthCheck(java.lang.String requestMethod, java.lang.String url, int timeoutMillis, OpenConnectionFunction openConnection)
requestMethod
- the method to use for the check request, GET
and HEAD
are
allowed valuesurl
- the URL that is requested using GET
timeoutMillis
- the timeout for establishing the connection and waiting for dataopenConnection
- provider of the HttpURLConnection