Set<ExportedInstance<T>> result = new HashSet<ExportedInstance<T>>();
for (Addon addon : getAddons())
{
if (addon.getStatus().isStarted())
{
ServiceRegistry serviceRegistry = addon.getServiceRegistry();
Set<ExportedInstance<T>> remoteInstances = serviceRegistry.getExportedInstances(type);
result.addAll(remoteInstances);
}
}
return result;
}