public class JettyComponent extends DefaultComponent
Contexts are registered like this:
First, if there is a jetty.xml config file, the contexts defined there are registered first; if there is no
jetty.xml, a log context will be create programatically and registered first.
Second an empty collection context is registered. Here will be registered all regular war contexts.
Third, the root collection is registered. This way all requests not handled by regular wars are directed to the root war, which usually is the webengine war in a nxserver application.
| Modifier and Type | Field and Description |
|---|---|
protected File |
config |
protected ContextManager |
ctxMgr |
protected File |
log |
static ComponentName |
NAME |
protected ClassLoader |
nuxeoCL |
static String |
P_SCAN_WEBDIR |
protected org.mortbay.jetty.Server |
server |
protected org.mortbay.jetty.handler.ContextHandlerCollection |
warContexts |
static String |
XP_FILTER |
static String |
XP_LISTENERS |
static String |
XP_SERVLET |
static String |
XP_WEB_APP |
lastModified| Constructor and Description |
|---|
JettyComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
applicationStarted(ComponentContext context)
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.
|
int |
getApplicationStartedOrder()
The component notification order for
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext). |
protected ClassLoader |
getClassLoader(ClassLoader cl) |
ContextManager |
getContextManager() |
org.mortbay.jetty.Server |
getServer() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
setNuxeoClassLoader(ClassLoader cl) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionpublic static final ComponentName NAME
public static final String XP_WEB_APP
public static final String XP_SERVLET
public static final String XP_FILTER
public static final String XP_LISTENERS
public static final String P_SCAN_WEBDIR
protected org.mortbay.jetty.Server server
protected ContextManager ctxMgr
protected org.mortbay.jetty.handler.ContextHandlerCollection warContexts
protected ClassLoader nuxeoCL
public JettyComponent()
public org.mortbay.jetty.Server getServer()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic ContextManager getContextManager()
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic <T> T getAdapter(Class<T> adapter)
Adaptablenull
if no such object can be found.getAdapter in interface AdaptablegetAdapter in class DefaultComponentadapter - the adapter class to look upnull if this object does not have an adapter for
the given classpublic void setNuxeoClassLoader(ClassLoader cl)
protected ClassLoader getClassLoader(ClassLoader cl)
public int getApplicationStartedOrder()
ComponentComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).
Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
getApplicationStartedOrder in interface ComponentgetApplicationStartedOrder in class DefaultComponentpublic void applicationStarted(ComponentContext context)
ComponentapplicationStarted in interface ComponentapplicationStarted in class DefaultComponentCopyright © 2016 Nuxeo SA. All rights reserved.