@Handler
public void handler() throws OpsException {
if (OpsContext.isConfigure()) {
for (OwnedItem<?> childServer : parentController.getChildren(OwnedItem.class)) {
ItemBase server = childServer.getItem();
if (server == null) {
// TODO: It's _possible_ that the child is ready instantly.
// Right now, we have to go through a retry cycle
throw new OpsException("Child server not ready");
}
List<EndpointInfo> endpoints = EndpointInfo.findEndpoints(server.getTags(), port);
if (endpoints.isEmpty()) {
// TODO: Cope in future e.g. if we only need one of two in a cluster
throw new OpsException("Child server not ready");
}