Class PackageAdminServiceListener

java.lang.Object
org.eclipse.jetty.osgi.PackageAdminServiceListener
All Implemented Interfaces:
EventListener, org.osgi.framework.ServiceListener

public class PackageAdminServiceListener extends Object implements org.osgi.framework.ServiceListener
PackageAdminServiceTracker

When the PackageAdmin service is activated we can look for the fragments attached to this bundle and do a fake "activate" on them.

See particularly the jetty-eeX-osgi-boot-jsp fragment bundles that uses this facility.

  • Constructor Details

    • PackageAdminServiceListener

      public PackageAdminServiceListener(org.osgi.framework.BundleActivator activator, org.osgi.framework.BundleContext context) throws Exception
      Throws:
      Exception
  • Method Details

    • serviceChanged

      public void serviceChanged(org.osgi.framework.ServiceEvent event)
      Invokes the optional BundleActivator in each fragment. By convention the bundle activator for a fragment must be in the package that is defined by the symbolic name of the fragment and the name of the class must be 'FragmentActivator'.
      Specified by:
      serviceChanged in interface org.osgi.framework.ServiceListener
      Parameters:
      event - The ServiceEvent object.
    • stop

      public void stop()