Class WebAppContextListener

java.lang.Object
org.glassfish.jersey.examples.osgi.helloworld.WebAppContextListener
All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener, org.osgi.framework.BundleActivator

public class WebAppContextListener extends Object implements org.osgi.framework.BundleActivator, jakarta.servlet.ServletContextListener
This is to make sure we signal the application has been deployed/un-deployed via the OSGi EventAdmin service.
Author:
Jakub Podlesak
  • Constructor Details

    • WebAppContextListener

      public WebAppContextListener()
  • Method Details

    • contextInitialized

      public void contextInitialized(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextInitialized in interface jakarta.servlet.ServletContextListener
    • contextDestroyed

      public void contextDestroyed(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextDestroyed in interface jakarta.servlet.ServletContextListener
    • start

      public void start(org.osgi.framework.BundleContext context) throws Exception
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Throws:
      Exception
    • stop

      public void stop(org.osgi.framework.BundleContext context) throws Exception
      Specified by:
      stop in interface org.osgi.framework.BundleActivator
      Throws:
      Exception