protected void removeExportRegistration()

in rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminCore.java [536:555]


    protected void removeExportRegistration(ExportRegistration eri) {
        synchronized (exportedServices) {
            for (Iterator<Collection<ExportRegistration>> it = exportedServices.values().iterator(); it.hasNext();) {
                Collection<ExportRegistration> value = it.next();
                for (Iterator<ExportRegistration> it2 = value.iterator(); it2.hasNext();) {
                    ExportRegistration er = it2.next();
                    if (er.equals(eri)) {
                        if (eri.getException() == null && eri.getExportReference() != null) {
                            eventProducer.notifyRemoval(eri.getExportReference());
                        }
                        it2.remove();
                        if (value.isEmpty()) {
                            it.remove();
                        }
                        return;
                    }
                }
            }
        }
    }