|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker
public class JettyContextHandlerServiceTracker
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.
Constructor Summary | |
---|---|
JettyContextHandlerServiceTracker(IManagedJettyServerRegistry registry)
|
Method Summary | |
---|---|
void |
reloadJettyContextHandler(String canonicalNameOfFileChanged,
String osgiContextHomeFolderCanonicalPath)
Called by the scanner when one of the context files is changed. |
void |
serviceChanged(org.osgi.framework.ServiceEvent ev)
Receives notification that a service has had a lifecycle change. |
protected void |
setupContextHomeScanner(File contextHome)
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JettyContextHandlerServiceTracker(IManagedJettyServerRegistry registry) throws Exception
registry
-
Exception
Method Detail |
---|
public void stop() throws Exception
Exception
protected void setupContextHomeScanner(File contextHome) throws IOException
contextHome
- Parent folder where the context files can override the context files
defined in the web bundles: equivalent to the contexts folder in a traditional
jetty installation.
when null, just do nothing.
IOException
public void serviceChanged(org.osgi.framework.ServiceEvent ev)
serviceChanged
in interface org.osgi.framework.ServiceListener
ev
- The ServiceEvent
object.public void reloadJettyContextHandler(String canonicalNameOfFileChanged, String osgiContextHomeFolderCanonicalPath)
contextFileFully
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |