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 |
---|---|
static ComponentName |
NAME |
static String |
P_SCAN_WEBDIR |
static String |
XP_FILTER |
static String |
XP_SERVLET |
static String |
XP_WEB_APP |
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.
|
ContextManager |
getContextManager() |
org.mortbay.jetty.Server |
getServer() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
registerExtension, 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 P_SCAN_WEBDIR
public org.mortbay.jetty.Server getServer()
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public ContextManager getContextManager()
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
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 applicationStarted(ComponentContext context) throws Exception
Component
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
Exception
Copyright © 2011 Nuxeo SA. All Rights Reserved.