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, unregisterExtension
public 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)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public ContextManager getContextManager()
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- 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()
Component
Component.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 Component
getApplicationStartedOrder
in class DefaultComponent
public void applicationStarted(ComponentContext context)
Component
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
Copyright © 2015 Nuxeo SA. All rights reserved.