@SuppressWarnings("unchecked") public HealthReport checkHealth(Processor subject) { List<HealthReport> activityReports = new ArrayList<HealthReport>(); for (Activity<?> a : subject.getActivityList()) { List<HealthChecker<?>> checkers = HealthCheckerFactory .getInstance().getHealthCheckersForObject(a); if (checkers.size() > 0) { List<HealthReport> reports = new ArrayList<HealthReport>(); for (HealthChecker checker : checkers) { reports.add(checker.checkHealth(a)); } if (reports.size() == 1) { activityReports.add(reports.get(0)); } else { activityReports.add(new HealthReport("Activity tests...", "", Status.OK, reports)); } } } HealthReport processorHealthReport = new ProcessorHealthReport( subject.getLocalName() + " Processor", activityReports); return processorHealthReport; }
@SuppressWarnings("unchecked") public HealthReport checkHealth(Processor subject) { List<HealthReport> activityReports = new ArrayList<HealthReport>(); for (Activity<?> a : subject.getActivityList()) { List<HealthChecker<?>> checkers = HealthCheckerFactory .getInstance().getHealthCheckersForObject(a); if (checkers.size() > 0) { List<HealthReport> reports = new ArrayList<HealthReport>(); for (HealthChecker checker : checkers) { reports.add(checker.checkHealth(a)); } if (reports.size() == 1) { activityReports.add(reports.get(0)); } else { activityReports.add(new HealthReport("Activity tests...", "", Status.OK, reports)); } } } HealthReport processorHealthReport = new ProcessorHealthReport( subject.getLocalName() + " Processor", activityReports); return processorHealthReport; }