Package net.targetr.rc.monitoring.health
Class CacheQueryHandler
java.lang.Object
net.targetr.rc.monitoring.health.CacheQueryHandler
Returns the current state of the supplied caches as JSON.
- Author:
- Dr Michael Gardiner
-
Constructor Summary
ConstructorsConstructorDescriptionCacheQueryHandler(HttpRequest httpReq, ProxyCache proxyCache, ResourceCache cache) Constructs a CacheQueryHandler for the given request and caches. -
Method Summary
Modifier and TypeMethodDescriptionReturns cache states as JSON for GET requests.
-
Constructor Details
-
CacheQueryHandler
Constructs a CacheQueryHandler for the given request and caches. Starts the Health monitor if not already started.- Parameters:
httpReq- the incoming requestproxyCache- the proxy response cache whose state is reportedcache- the common resource cache whose state is reported
-
-
Method Details
-
generateResponse
Returns cache states as JSON for GET requests.- Returns:
- the generated HTTP response
- Throws:
IOException- if an error occurs generating the response
-