Result result = parentComponent.getASConnection().execute(operation);
return (String) result.getResult();
}
private List<ServerInfo> getManagedServers(String domainHost) {
Address address = new Address("host", domainHost);
Operation operation = new ReadChildrenNames(address, "server-config");
ASConnection connection = parentComponent.getASConnection();
Result res = connection.execute(operation);
List<String> servers = (List<String>) res.getResult();
List<ServerInfo> ret = new ArrayList<ServerInfo>(servers.size());
for (String server : servers) {
ServerInfo info = new ServerInfo();
info.name = server;
ret.add(info);
address = new Address("host", domainHost);
address.add("server-config", server);
operation = new ReadResource(address);
ComplexResult cres = connection.executeComplex(operation);
Map<String, Object> map = cres.getResult();
info.group = (String) map.get("group");
info.autoStart = (Boolean) map.get("auto-start");