}
}
public void registerDeployedServiceAssembly(ServiceReference reference, DeployedAssembly assembly) {
try {
ServiceAssemblyDesc desc = new ServiceAssemblyDesc();
desc.setIdentification(new Identification());
desc.getIdentification().setName(assembly.getName());
List<ServiceUnitDesc> sus = new ArrayList<ServiceUnitDesc>();
for (Map.Entry<String, String> unit : assembly.getServiceUnits().entrySet()) {
ServiceUnitDesc suDesc = new ServiceUnitDesc();
suDesc.setIdentification(new Identification());
suDesc.getIdentification().setName(unit.getKey());
suDesc.setTarget(new Target());
suDesc.getTarget().setComponentName(unit.getValue());
sus.add(suDesc);
}
desc.setServiceUnits(sus.toArray(new ServiceUnitDesc[sus.size()]));
Descriptor descriptor = new Descriptor();
descriptor.setServiceAssembly(desc);
ServiceAssemblyInstaller installer = new ServiceAssemblyInstaller(this, descriptor, assembly, autoStart);
installer.setBundle(reference.getBundle());