// FIXME: move out of synchronized ... -> blocks until publication is finished
for (String iface : interfaces) {
LOG.info("creating server for interface " + iface);
ExportRegistrationImpl exportRegistration = exportRegs.get(iface);
ConfigurationTypeHandler handler = getHandler(configurationTypes, serviceProperties,
getHandlerProperties());
Object serviceObject = bctx.getService(serviceReference);
BundleContext callingContext = serviceReference.getBundle().getBundleContext();
if (handler == null) {
// TODO: publish error event ? not sure
return Collections.EMPTY_LIST;
}
LOG.info("found handler for " + iface + " -> " + handler);
String interfaceName = iface;
// this is an extra sanity check, but do we really need it now ?
Class<?> interfaceClass = ClassUtils.getInterfaceClass(serviceObject, interfaceName);
if (interfaceClass != null) {
handler.createServer(exportRegistration, bctx, callingContext, serviceProperties,
interfaceClass, serviceObject);
if(exportRegistration.getException()==null){
LOG.info("created server for interface " + iface);