}
private void stopPorts() {
log.info("Stopping ports...");
for (Iterator i = ports.values().iterator(); i.hasNext();) {
Port port = (Port) i.next();
String name = port.getName();
try {
log.info("Stopping port " + name + "...");
port.close();
}
catch (Exception ex) {
log.warn("Port " + name + " did not stop gracefully", ex);
}
}