/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @return Report containing health check status
*/
public HealthCheckReport performHealthCheck() {
- final HealthCheckReport report = new HealthCheckReport();
+ final var report = new HealthCheckReport();
report.setName(NAME);
report.setUrl(URL);
- report.setHealthy(XacmlPdpActivator.isAlive());
- report.setCode(XacmlPdpActivator.isAlive() ? 200 : 500);
- report.setMessage(XacmlPdpActivator.isAlive() ? ALIVE : NOT_ALIVE);
+
+ boolean alive = XacmlPdpActivator.getCurrent().isAlive();
+
+ report.setHealthy(alive);
+ report.setCode(alive ? 200 : 500);
+ report.setMessage(alive ? ALIVE : NOT_ALIVE);
return report;
}
}