Element rem = (Element) remoteSchedulerList.item(i);
// TODO: besser ip verwenden?
String currHost = rem.getAttribute("hostname");
String currPort = rem.getAttribute("tcp_port");
int iCurrPort = Integer.parseInt(currPort);
RemoteScheduler sched = new RemoteScheduler(currHost, iCurrPort);
remoteSchedulers.add(sched);
}
}
else {
int iPort = Integer.parseInt(port);
RemoteScheduler sched = new RemoteScheduler(host, iPort);
remoteSchedulers.add(sched);
}
Iterator iter = remoteSchedulers.iterator();
while (iter.hasNext()) {
RemoteScheduler scheduler = (RemoteScheduler) iter.next();
try {
scheduler.sendCommand(command);
}
catch (Exception e) {
getLogger().warn("Failed to send command: " + e);
}
}