Class TestBundle

  • All Implemented Interfaces:
    org.osgi.framework.BundleActivator

    public class TestBundle
    extends Object
    implements org.osgi.framework.BundleActivator
    Sample test OSGi bundle.
    • Constructor Detail

      • TestBundle

        public TestBundle()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext bundleContext)
                   throws Exception
        Starts the bundle, will write a Hello, World text.
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Parameters:
        bundleContext - OSGi bundle context.
        Throws:
        Exception - If anything goes wrong.
      • stop

        public void stop​(org.osgi.framework.BundleContext bundleContext)
                  throws Exception
        Stops the bundle, will write a Goodbye, World text.
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
        Parameters:
        bundleContext - OSGi bundle context.
        Throws:
        Exception - If anything goes wrong.