public RepositoryAdmin getRepositoryAdmin ( BundleContext context , ObrClassFinderService autoStartNotify ) throws InvalidSyntaxException { RepositoryAdmin admin = null ; ServiceReference [ ] ref = context . getServiceReferences ( RepositoryAdmin . class . getName ( ) , null ) ; if ( ( ref != null ) && ( ref . length > 0 ) ) admin = ( RepositoryAdmin ) context . getService ( ref [ 0 ] ) ; if ( admin == null ) if ( autoStartNotify != null ) if ( waitingForRepositoryAdmin == false ) { // Wait until the repository service is up until I start servicing clients context . addServiceListener ( new RepositoryAdminServiceListener ( autoStartNotify , context ) , "(" + Constants . OBJECTCLASS + "=" + RepositoryAdmin . class . getName ( ) + ")" ) ; waitingForRepositoryAdmin = true ; } return admin ; }
Get the repository admin service .