@ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE ) protected Map < String , Object > setConfiguration ( ServiceReference < SecurityConfiguration > ref ) { String id = ( String ) ref . getProperty ( KEY_ID ) ; if ( id != null ) { configs . putReference ( id , ref ) ; } else { Tr . error ( tc , "SECURITY_SERVICE_REQUIRED_SERVICE_WITHOUT_ID" , "securityConfiguration" ) ; } return getServiceProperties ( ) ; }
Method will be called for each SecurityConfiguration that is registered in the OSGi service registry . We maintain an internal map of these for easy access .