Search in sources :

Example 1 with HealthStatusProvider

use of org.openremote.model.system.HealthStatusProvider in project openremote by openremote.

the class HealthStatusService method init.

@Override
public void init(Container container) throws Exception {
    ServiceLoader.load(HealthStatusProvider.class).forEach(healthStatusProviderList::add);
    for (HealthStatusProvider healthStatusProvider : healthStatusProviderList) {
        if (healthStatusProvider instanceof ContainerService) {
            ((ContainerService) healthStatusProvider).init(container);
        }
    }
    container.getService(ManagerWebService.class).addApiSingleton(new StatusResourceImpl(healthStatusProviderList));
}
Also used : HealthStatusProvider(org.openremote.model.system.HealthStatusProvider) ManagerWebService(org.openremote.manager.web.ManagerWebService) ContainerService(org.openremote.model.ContainerService)

Aggregations

ManagerWebService (org.openremote.manager.web.ManagerWebService)1 ContainerService (org.openremote.model.ContainerService)1 HealthStatusProvider (org.openremote.model.system.HealthStatusProvider)1