ports.clear();
} else {
Iterator<Map.Entry<String, DefaultInputPortContext>> iter = ports.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<String, DefaultInputPortContext> entry = iter.next();
DefaultInputPortContext port = entry.getValue();
InputPortContext match = null;
for (InputPortContext p : update.ports()) {
if (port.name().equals(p.name())) {
match = p;
break;
}
}
if (match != null) {
port.notify(match);
} else {
port.notify(null);
iter.remove();
}
}
for (InputPortContext port : update.ports()) {
if (!ports.containsKey(port.name())) {
ports.put(port.name(), DefaultInputPortContext.Builder.newBuilder(port).build().setInputContext(this));
}
}
}
super.notify(this);
}