public SimpleResponse setHealthStatusInfo(RequestContext ctx,
HealthStatusInfoRequest message, TimeConstraints timeConstraints) throws SimpleException {
ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));
CougarComponentStatuses cacheAccessStatusDetail = message
.getCacheAccessStatusDetail();
CougarComponentStatuses dbConnectionStatusDetail = message
.getDBConnectionStatusDetail();
CougarComponentStatuses serviceStatusDetail = message
.getServiceStatusDetail();
Boolean initialiseHealthStatusDetail = message.getInitialiseHealthStatusObject();
// reset the status
if ((initialiseHealthStatusDetail != null) && (initialiseHealthStatusDetail)) {
((BaselineMonitor)monitorRegistry.getMonitor("DB"+instance)).setStatus(Status.OK);
((BaselineMonitor)monitorRegistry.getMonitor("Cache"+instance)).setStatus(Status.OK);
((BaselineMonitor)monitorRegistry.getMonitor("Service"+instance)).setStatus(Status.OK);
}
if (serviceStatusDetail != null) {
((BaselineMonitor)monitorRegistry.getMonitor("Service"+instance)).setStatus(toStatus(serviceStatusDetail.toString()));
}
if (cacheAccessStatusDetail != null) {
((BaselineMonitor)monitorRegistry.getMonitor("Cache"+instance)).setStatus(toStatus(cacheAccessStatusDetail.toString()));
}