org.glassfish.jersey.examples.osgi.helloworld
Class WebAppContextListener

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

public class WebAppContextListener
extends java.lang.Object
implements org.osgi.framework.BundleActivator, javax.servlet.ServletContextListener

This is to make sure we signal the application has been deployed/un-deployed via the OSGi EventAdmin service.

Author:
Jakub Podlesak (jakub.podlesak at oracle.com)

Constructor Summary
WebAppContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAppContextListener

public WebAppContextListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent sce)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent sce)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

start

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

stop

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


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.