Class JettyBootstrapActivator

  • All Implemented Interfaces:

    public class JettyBootstrapActivator
    extends java.lang.Object
    implements org.osgi.framework.BundleActivator

    Bootstrap jetty and publish a default Server instance as an OSGi service.

    Listen for other Server instances to be published as services and support them as deployment targets.

    Listen for Bundles to be activated, and deploy those that represent webapps/ContextHandlers to one of the known Server instances.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JettyBootstrapActivator getInstance()  
      void start​(org.osgi.framework.BundleContext context)
      Setup a new jetty Server, registers it as a service.
      void stop​(org.osgi.framework.BundleContext context)
      Stop the activator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JettyBootstrapActivator

        public JettyBootstrapActivator()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext context)
                   throws java.lang.Exception
        Setup a new jetty Server, registers it as a service. Setup the Service tracker for the jetty ContextHandlers that are in charge of deploying the webapps. Setup the BundleListener that supports the extender pattern for the jetty ContextHandler.
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        context - the bundle context
      • stop

        public void stop​(org.osgi.framework.BundleContext context)
                  throws java.lang.Exception
        Stop the activator.
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
        See Also: