public class HttpStatusHealthCheckImpl extends AbstractHealthCheck
Constructor and Description |
---|
HttpStatusHealthCheckImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addUrl(java.lang.String url) |
void |
addUrlList(java.lang.String urlList) |
HealthCheckResult |
checkHealth()
Periodically pings the server to check for anything going wrong.
|
protected HealthCheckResult |
checkPing(java.lang.String url) |
java.lang.String |
getPingHost() |
int |
getPingPort() |
java.util.regex.Pattern |
getRegexp() |
long |
getSocketTimeout() |
java.util.Collection<java.lang.String> |
getUrls() |
void |
init()
Initialize the pinger.
|
protected java.lang.String |
readResponse(ReadStream is) |
void |
setPingHost(java.lang.String pingHost) |
void |
setPingPort(int pingPort) |
void |
setRegexp(java.util.regex.Pattern regexp) |
void |
setSocketTimeout(long timeout) |
java.lang.String |
toString() |
findDelegate, getDelegate, getLastResult, getLogPeriod, getName, hasDelegate, isEnabled, logResult, setEnabled, setLogPeriod, setName, silenceFor, start, stop
public java.lang.String getPingHost()
public void setPingHost(java.lang.String pingHost)
public int getPingPort()
public void setPingPort(int pingPort)
@Configurable public void addUrl(java.lang.String url)
@Configurable public void addUrlList(java.lang.String urlList)
public java.util.Collection<java.lang.String> getUrls()
public long getSocketTimeout()
public void setSocketTimeout(long timeout)
public java.util.regex.Pattern getRegexp()
public void setRegexp(java.util.regex.Pattern regexp)
public void init()
init
in class AbstractHealthCheck
public HealthCheckResult checkHealth()
protected HealthCheckResult checkPing(java.lang.String url)
protected java.lang.String readResponse(ReadStream is) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class AbstractHealthCheck