Start and Stop Behavior

There are cases where a bundle either does not have any imported services, or wishes to execute behavior that does not depend upon its imported services. Since SAT makes the BundleActivator methods start(BundleContext) and stop(BundleContext) final, the methods start() and stop() are provided for this purpose. For example, a bundle that wishes to open a window when it starts and close the window when it stops could implement the following methods:

   protected void start() {
     ClientFeatureAdminWindow window = getWindow();
     window.open();
   }

   protected void stop() {
     ClientFeatureAdminWindow window = getWindow();
     window.close();
   }