private void fireRegistrationAdded(ServiceRegistration registration) { for(RegistrationHook hook : m_hooks) { hook.registrationAdded(registration); } }
private void fireRegistrationRemoved(ServiceRegistration registration) { for(RegistrationHook hook : m_hooks) { hook.registrationRemoved(registration); } } private <T> Set<ServiceRegistration> getRegistrations(Class<T> serviceInterface) {
private void fireRegistrationAdded(ServiceRegistration registration) { for(RegistrationHook hook : m_hooks) { hook.registrationAdded(registration); } }
private void fireRegistrationRemoved(ServiceRegistration registration) { for(RegistrationHook hook : m_hooks) { hook.registrationRemoved(registration); } } private <T> Set<ServiceRegistration> getRegistrations(Class<T> serviceInterface) {
@Override public void addRegistrationHook(RegistrationHook hook, boolean notifyForExistingProviders) { if (notifyForExistingProviders) { Set<ServiceRegistration> registrations = null; synchronized (m_registrationMap) { m_hooks.add(hook); registrations = getAllRegistrations(); } for(ServiceRegistration registration : registrations) { hook.registrationAdded(registration); } } else { m_hooks.add(hook); } }
@Override public void addRegistrationHook(RegistrationHook hook, boolean notifyForExistingProviders) { if (notifyForExistingProviders) { Set<ServiceRegistration> registrations = null; synchronized (m_registrationMap) { m_hooks.add(hook); registrations = getAllRegistrations(); } for(ServiceRegistration registration : registrations) { hook.registrationAdded(registration); } } else { m_hooks.add(hook); } }