Set<ServerIdentity> result = new HashSet<ServerIdentity>();
for (String bindingGroup : relatedBindingGroups) {
result.addAll(getServersForType(SOCKET_BINDING_GROUP, bindingGroup, domain, host, localHostInfo.getLocalHostName(), serverProxies));
}
for (Iterator<ServerIdentity> iter = result.iterator(); iter.hasNext(); ) {
ServerIdentity gs = iter.next();
ModelNode server = host.get(SERVER_CONFIG, gs.getServerName());
if (server.hasDefined(SOCKET_BINDING_GROUP) && !bindingGroupName.equals(server.get(SOCKET_BINDING_GROUP).asString())) {
iter.remove();
}
}
return result;