com.caucho.env.health
Class HttpStatusHealthCheckImpl

java.lang.Object
  extended by com.caucho.health.check.AbstractHealthCheck
      extended by com.caucho.env.health.HttpStatusHealthCheckImpl
All Implemented Interfaces:
HealthCheck
Direct Known Subclasses:
HttpStatusHealthCheck

public class HttpStatusHealthCheckImpl
extends AbstractHealthCheck


Constructor Summary
HttpStatusHealthCheckImpl()
           
 
Method Summary
 void addUrl(java.lang.String url)
           
 HealthCheckResult checkHealth()
          Periodically pings the server to check for anything going wrong.
protected  HealthCheckResult checkPing(Path url)
           
 java.lang.String getPingHost()
           
 int getPingPort()
           
 java.util.regex.Pattern getRegexp()
           
 long getSocketTimeout()
           
 java.util.List<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()
           
 
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

HttpStatusHealthCheckImpl

public HttpStatusHealthCheckImpl()
Method Detail

getPingHost

public java.lang.String getPingHost()

setPingHost

public void setPingHost(java.lang.String pingHost)

getPingPort

public int getPingPort()

setPingPort

public void setPingPort(int pingPort)

addUrl

public void addUrl(java.lang.String url)

getUrls

public java.util.List<java.lang.String> getUrls()

getSocketTimeout

public long getSocketTimeout()

setSocketTimeout

public void setSocketTimeout(long timeout)

getRegexp

public java.util.regex.Pattern getRegexp()

setRegexp

public void setRegexp(java.util.regex.Pattern regexp)

init

public void init()
Initialize the pinger.

Overrides:
init in class AbstractHealthCheck

checkHealth

public HealthCheckResult checkHealth()
Periodically pings the server to check for anything going wrong.


checkPing

protected HealthCheckResult checkPing(Path url)

readResponse

protected java.lang.String readResponse(ReadStream is)
                                 throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class AbstractHealthCheck