org.eclipse.jetty.osgi.boot.internal.webapp
Class JettyContextHandlerServiceTracker
java.lang.Object
org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker
- All Implemented Interfaces:
- EventListener, org.osgi.framework.ServiceListener
public class JettyContextHandlerServiceTracker
- extends Object
- implements org.osgi.framework.ServiceListener
When a ContextHandler
service is activated we look into it and if the
corresponding webapp is actually not configured then we go and register it.
The idea is to always go through this class when we deploy a new webapp on
jetty.
We are exposing each web-application as an OSGi service. This lets us update
the webapps and stop/start them directly at the OSGi layer. It also give us
many ways to declare those services: Declarative Services for example.
It is a bit different from the way the HttpService works where we would have
a WebappService and we woud register a webapp onto it.
It does not go against RFC-66 nor does it prevent us from supporting the
WebappContainer semantics.
Method Summary |
void |
serviceChanged(org.osgi.framework.ServiceEvent ev)
Receives notification that a service has had a lifecycle change. |
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JettyContextHandlerServiceTracker
public JettyContextHandlerServiceTracker(org.osgi.framework.BundleContext context,
Server server)
throws Exception
- Parameters:
context
- server
-
- Throws:
Exception
stop
public void stop()
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent ev)
- Receives notification that a service has had a lifecycle change.
- Specified by:
serviceChanged
in interface org.osgi.framework.ServiceListener
- Parameters:
ev
- The ServiceEvent
object.
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.