Imported Service Properties

Subclasses of BaseBundleActivator can query the properties of an imported service using the methods getImportedServicePropertyKeys(String) and getImportedServiceProperty(String, Object). For example:

   protected void activate() {
     String[] keys = getImportedServicePropertyKeys(CounterService.SERVICE_NAME);
     String key;
     Object value;
     System.out.println("CounterService Properties:");
     for (int i = 0; i < keys.length; i++) {
       key = keys [ i ];
       value = getImportedServiceProperty(CounterService.SERVICE_NAME, key);
       System.out.println(key + " = " + value);
     }
   }