if (req instanceof GetChildMessage) {
reply(req, getChild(((GetChildMessage) req).name));
} else if (req instanceof AddChildMessage) {
reply(req, addChild(((AddChildMessage) req).spec));
} else if (req instanceof RemoveChildMessage) {
final RemoveChildMessage m = (RemoveChildMessage) req;
reply(req, removeChild(m.name, m.terminate));
}
} catch (Exception e) {
replyError(req, e);
}