Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
     @Component
     public class SCR {
         @BundleDependency(required = false,
                           removed = "unloadServiceComponents",
                           filter = "(Service-Component=*)"
                           stateMask = Bundle.ACTIVE)
         void loadServiceComponents(Bundle b) {
             String descriptorPaths = (String) b.getHeaders().get("Service-Component");
             // load all service component specified in the XML descriptorPaths files ...
         }

         void unloadServiceComponents(Bundle b) {
             // unload all service component we loaded from our "loadServiceComponents" method.
         }
     }

...