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 |
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 |
start(ComponentContext context)
Start the component.
|
void |
stop(ComponentContext context)
Stop the component.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted
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.
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void stop(ComponentContext context)
Component
stop
in interface Component
stop
in class DefaultComponent
Copyright © 2017 Nuxeo. All rights reserved.