}
}
@Override
public ServiceStatusDTO getFabricServiceStatus() {
ServiceStatusDTO rc = new ServiceStatusDTO();
CuratorFramework curator = fabricService.adapt(CuratorFramework.class);
try {
rc.setClientValid(curator != null);
} catch (Throwable t) {
rc.setClientValid(false);
}
if (rc.isClientValid()) {
try {
rc.setClientConnected(curator.getZookeeperClient().isConnected());
if (!rc.isClientConnected()) {
rc.setClientConnectionError(curator.getState().toString());
}
} catch (Throwable t) {
rc.setClientConnected(false);
}
if (rc.isClientValid() && rc.isClientConnected()) {
Container c = fabricService.getCurrentContainer();
try {
rc.setManaged(c.isManaged());
} catch (Throwable t) {
}
try {
rc.setProvisionComplete(c.isProvisioningComplete());
} catch (Throwable t) {
}
}