|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.health.check.AbstractHealthCheck
com.caucho.env.health.HttpStatusHealthCheckImpl
com.caucho.health.check.HttpStatusHealthCheck
@Singleton @Configurable @Named public class HttpStatusHealthCheck
Monitors one or more URLs on the current Resin instance by making an HTTP GET request and comparing the returned HTTP status code to a pattern.
Generates CRITICAL if the HTTP GET request failed to connect or the status
code does not match the regexp.
| Constructor Summary | |
|---|---|
HttpStatusHealthCheck()
|
|
| Method Summary | |
|---|---|
void |
addUrl(java.lang.String url)
Adds a new URL to be tested. |
void |
init()
Initialize the pinger. |
void |
setPingHost(java.lang.String pingHost)
Sets the server's ping host |
void |
setPingPort(int pingPort)
Sets the server's ping port (default 80) |
void |
setRegexp(java.util.regex.Pattern regexp)
Set the HTTP status regular expression (default "200") |
void |
setSocketTimeout(Period period)
Sets the socket connection timeout (default 10 seconds) |
| Methods inherited from class com.caucho.env.health.HttpStatusHealthCheckImpl |
|---|
checkHealth, checkPing, getPingHost, getPingPort, getRegexp, getSocketTimeout, getUrls, readResponse, setSocketTimeout, toString |
| Methods inherited from class com.caucho.health.check.AbstractHealthCheck |
|---|
findDelegate, getDelegate, getName, isEnabled, setEnabled, setName, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpStatusHealthCheck()
| Method Detail |
|---|
@PostConstruct public void init()
HttpStatusHealthCheckImpl
init in class HttpStatusHealthCheckImpl@Configurable public void setPingHost(java.lang.String pingHost)
setPingHost in class HttpStatusHealthCheckImpl@Configurable public void setPingPort(int pingPort)
setPingPort in class HttpStatusHealthCheckImpl@Configurable public void addUrl(java.lang.String url)
addUrl in class HttpStatusHealthCheckImpl@Configurable public void setSocketTimeout(Period period)
@Configurable public void setRegexp(java.util.regex.Pattern regexp)
setRegexp in class HttpStatusHealthCheckImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||