Class HealthCheckHandler

java.lang.Object
net.targetr.rc.monitoring.health.HealthCheckHandler

public class HealthCheckHandler extends Object
Returns a response about the current server health as JSON.
Author:
Dr Michael Gardiner
  • Constructor Details

    • HealthCheckHandler

      public HealthCheckHandler(HttpRequest httpReq)
      Constructs a HealthCheckHandler for the given request. Starts the Health monitor if not already started.
      Parameters:
      httpReq - the incoming request
  • Method Details

    • generateResponse

      public HttpResponse generateResponse() throws IOException
      Generates a JSON response containing server health metrics and active pages.
      Returns:
      the generated HTTP response
      Throws:
      IOException - if an error occurs generating the response