Package net.targetr.rc.monitoring.health
Class HealthCheckHandler
java.lang.Object
net.targetr.rc.monitoring.health.HealthCheckHandler
Returns a response about the current server health as JSON.
- Author:
- Dr Michael Gardiner
-
Constructor Summary
ConstructorsConstructorDescriptionHealthCheckHandler(HttpRequest httpReq) Constructs a HealthCheckHandler for the given request. -
Method Summary
Modifier and TypeMethodDescriptionGenerates a JSON response containing server health metrics and active pages.
-
Constructor Details
-
HealthCheckHandler
Constructs a HealthCheckHandler for the given request. Starts the Health monitor if not already started.- Parameters:
httpReq- the incoming request
-
-
Method Details
-
generateResponse
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
-