@ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE , target = "(config.displayId=*)" ) protected Map < String , Object > setUserRegistry ( ServiceReference < UserRegistryService > ref ) { adjustUserRegistryServiceRef ( ref ) ; // determine a new user registry service userRegistryService . set ( null ) ; return getServiceProperties ( ) ; }
Method will be called for each UserRegistryService that is registered in the OSGi service registry . We maintain an internal map of these for easy access .