public class JettyContainer extends AbstractJettyContainer
This container requires that the jetty server register DecoratingListener
to dynamically register a decorator instance that wraps the WeldDecorator
added as an attribute. The jetty decorate module does this and indicates it's
availability by setting the "org.eclipse.jetty.webapp.DecoratingListener" to the
name of the watched attribute.
Jetty also provides the cdi-spi module that may directly invoke the
CDI SPI. This module indicates it's availability by setting the "org.eclipse.jetty.cdi"
context attribute to "CdiDecorator". If this module is used, then this JettyContainer
only logs a message and does no further integration.
JettyLegacyContainer| Modifier and Type | Field and Description |
|---|---|
static String |
CDI_DECORATING_LISTENER_ATTRIBUTE |
static String |
CDI_DECORATING_LISTENER_MODE |
static String |
CDI_SPI_DECORATOR_MODE |
static String |
DECORATING_LISTENER_ATTRIBUTE |
static String |
DECORATING_LISTENER_MODE |
static Container |
INSTANCE |
static String |
JETTY_CDI_ATTRIBUTE |
INJECTOR_ATTRIBUTE_NAMECONTEXT_PARAM_CONTAINER_CLASS| Constructor and Description |
|---|
JettyContainer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
classToCheck()
Get class name to check is we can use this container.
|
void |
initialize(ContainerContext context)
Initialize web container.
|
boolean |
touch(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
ContainerContext context)
Touch if this container can be used.
|
destroypublic static final Container INSTANCE
public static final String JETTY_CDI_ATTRIBUTE
public static final String CDI_SPI_DECORATOR_MODE
public static final String CDI_DECORATING_LISTENER_MODE
public static final String CDI_DECORATING_LISTENER_ATTRIBUTE
public static final String DECORATING_LISTENER_MODE
public static final String DECORATING_LISTENER_ATTRIBUTE
protected String classToCheck()
AbstractContainerclassToCheck in class AbstractContainerpublic boolean touch(org.jboss.weld.resources.spi.ResourceLoader resourceLoader, ContainerContext context) throws Exception
Containertouch in interface Containertouch in class AbstractContainerresourceLoader - the ResourceLoader to use for class-availability testingcontext - the container contextException - for any errorpublic void initialize(ContainerContext context)
Containerinitialize in interface Containerinitialize in class AbstractJettyContainercontext - the container contextCopyright © 2020. All rights reserved.