private List<Server> createServerList() {
// 1. no whichTarget specified
if (!StringUtils.ok(whichTarget))
return allServers.getServer();
ReferenceContainer rc = domain.getReferenceContainerNamed(whichTarget);
// 2. Not a server or a cluster. Could be a config or a Node
if (rc == null) {
return getServersForNodeOrConfig();
}
else if (rc.isServer()) {
List<Server> l = new LinkedList<Server>();
l.add((Server) rc);
return l;
}
else if (rc.isCluster()) { // can't be anything else currently! (June 2010)
Cluster cluster = (Cluster) rc;
return cluster.getInstances();
}
else {
return null;