use of io.undertow.server.handlers.proxy.mod_cluster.ModClusterController in project wildfly by wildfly.
the class ModClusterResource method getChildrenNames.
@Override
public Set<String> getChildrenNames(final String childType) {
if (BALANCER.equals(childType)) {
ModClusterService service = service(name);
if (service == null) {
return Collections.emptySet();
}
ModCluster modCluster = service.getModCluster();
if (modCluster == null) {
return Collections.emptySet();
}
ModClusterController controller = modCluster.getController();
if (controller == null) {
return Collections.emptySet();
}
ModClusterStatus status = controller.getStatus();
final Set<String> result = new LinkedHashSet<>();
for (ModClusterStatus.LoadBalancer balancer : status.getLoadBalancers()) {
result.add(balancer.getName());
}
return result;
}
return delegate.getChildrenNames(childType);
}
Aggregations