Search in sources :

Example 1 with JettyServerServiceTracker

use of org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker in project jetty.project by eclipse.

the class JettyBootstrapActivator method start.

/* ------------------------------------------------------------ */
/**
     * 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.
     * 
     * @param context the bundle context
     */
public void start(final BundleContext context) throws Exception {
    INSTANCE = this;
    // track other bundles and fragments attached to this bundle that we
    // should activate.
    _packageAdminServiceTracker = new PackageAdminServiceTracker(context);
    // track jetty Server instances that we should support as deployment targets
    _jettyServerServiceTracker = new ServiceTracker(context, context.createFilter("(objectclass=" + Server.class.getName() + ")"), new JettyServerServiceTracker());
    _jettyServerServiceTracker.open();
    // Create a default jetty instance right now.
    Server defaultServer = DefaultJettyAtJettyHomeHelper.startJettyAtJettyHome(context);
}
Also used : Server(org.eclipse.jetty.server.Server) ServiceTracker(org.osgi.util.tracker.ServiceTracker) PackageAdminServiceTracker(org.eclipse.jetty.osgi.boot.utils.internal.PackageAdminServiceTracker) JettyServerServiceTracker(org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker) JettyServerServiceTracker(org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker) PackageAdminServiceTracker(org.eclipse.jetty.osgi.boot.utils.internal.PackageAdminServiceTracker)

Aggregations

JettyServerServiceTracker (org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker)1 PackageAdminServiceTracker (org.eclipse.jetty.osgi.boot.utils.internal.PackageAdminServiceTracker)1 Server (org.eclipse.jetty.server.Server)1 ServiceTracker (org.osgi.util.tracker.ServiceTracker)1