Class JettyContainer

  • All Implemented Interfaces:
    Container

    public class JettyContainer
    extends AbstractJettyContainer
    Jetty Container.

    This container requires that the jetty server register CdiDecoratingListener 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.ee10.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 "CdiSpiDecorator". If this module is used, then this JettyContainer only logs a message and does no further integration.

    Since:
    Jetty 12+
    Author:
    Greg Wilkins
    • Constructor Detail

      • JettyContainer

        public JettyContainer()
    • Method Detail

      • touch

        public boolean touch​(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
                             ContainerContext context)
                      throws Exception
        Description copied from interface: Container
        Touch if this container can be used. We should throw an exception if it cannot be used.
        Specified by:
        touch in interface Container
        Overrides:
        touch in class AbstractContainer
        Parameters:
        resourceLoader - the ResourceLoader to use for class-availability testing
        context - the container context
        Returns:
        true if touch was successful, false or exception otherwise
        Throws:
        Exception - for any error