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
  • Field Details

  • Constructor Details

    • JettyContainer

      public JettyContainer()
  • Method Details

    • classToCheck

      protected String classToCheck()
      Description copied from class: AbstractContainer
      Get class name to check is we can use this container.
      Specified by:
      classToCheck in class AbstractContainer
      Returns:
      the class name to check
    • 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
    • initialize

      public void initialize(ContainerContext context)
      Description copied from interface: Container
      Initialize web container.
      Specified by:
      initialize in interface Container
      Overrides:
      initialize in class AbstractJettyContainer
      Parameters:
      context - the container context