void CommunicatorDescriptorBuilder::addAdapter(const XmlAttributesHelper& attrs) { AdapterDescriptor desc; desc.name = attrs("name"); if(attrs.contains("id")) { desc.id = attrs("id"); } else { string fqn = "${server}"; if(ServiceDescriptorPtr::dynamicCast(_descriptor)) { fqn += ".${service}"; } desc.id = fqn + "." + desc.name; } desc.replicaGroupId = attrs("replica-group", ""); desc.priority = attrs("priority", ""); desc.registerProcess = attrs.asBool("register-process", false); if(desc.id == "") { throw "empty `id' for adapter `" + desc.name + "'"; } desc.serverLifetime = attrs.asBool("server-lifetime", true); _descriptor->adapters.push_back(desc); addProperty(_hiddenProperties, desc.name + ".Endpoints", attrs("endpoints", "default")); if(attrs.contains("proxy-options")) { addProperty(_hiddenProperties, desc.name + ".ProxyOptions", attrs("proxy-options", "")); } }
void ServerDescriptorBuilder::init(const ServerDescriptorPtr& desc, const XmlAttributesHelper& attrs) { CommunicatorDescriptorBuilder::init(desc, attrs); _descriptor = desc; _descriptor->id = attrs("id"); _descriptor->exe = attrs("exe"); _descriptor->activationTimeout = attrs("activation-timeout", ""); _descriptor->deactivationTimeout = attrs("deactivation-timeout", ""); _descriptor->pwd = attrs("pwd", ""); _descriptor->activation = attrs("activation", "manual"); _descriptor->applicationDistrib = attrs.asBool("application-distrib", true); _descriptor->allocatable = attrs.asBool("allocatable", false); _descriptor->user = attrs("user", ""); }