Class ServletContainerInitializerHolder

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.ee10.servlet.BaseHolder<jakarta.servlet.ServletContainerInitializer>
org.eclipse.jetty.ee10.servlet.ServletContainerInitializerHolder
All Implemented Interfaces:
Dumpable, LifeCycle
Direct Known Subclasses:
AnnotationConfiguration.DiscoveredServletContainerInitializerHolder

public class ServletContainerInitializerHolder extends BaseHolder<jakarta.servlet.ServletContainerInitializer>
Holds a ServletContainerInitializer.
  • Field Details

    • _startupClassNames

      protected Set<String> _startupClassNames
    • _startupClasses

      protected Set<Class<?>> _startupClasses
    • __pattern

      public static final Pattern __pattern
  • Constructor Details

    • ServletContainerInitializerHolder

      protected ServletContainerInitializerHolder(Source source)
    • ServletContainerInitializerHolder

      public ServletContainerInitializerHolder()
    • ServletContainerInitializerHolder

      public ServletContainerInitializerHolder(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass)
    • ServletContainerInitializerHolder

      public ServletContainerInitializerHolder(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass, Class<?>... startupClasses)
    • ServletContainerInitializerHolder

      public ServletContainerInitializerHolder(jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses)
    • ServletContainerInitializerHolder

      public ServletContainerInitializerHolder(Source source, jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses)
  • Method Details

    • addStartupClasses

      public void addStartupClasses(String... names)
      Add the names of classes which should be passed to the SCI onStartup method.
      Parameters:
      names - the names of classes which should be passed to the SCI onStartup method
    • addStartupClasses

      public void addStartupClasses(Class<?>... clazzes)
      Add classes that should be passed to the SCI onStartup method.
      Parameters:
      clazzes - classes that should be passed to the SCI onStartup method
    • resolveStartupClasses

      protected Set<Class<?>> resolveStartupClasses() throws Exception
      Throws:
      Exception
    • doStart

      public void doStart() throws Exception
      Description copied from class: AbstractLifeCycle
      Method to override to start the lifecycle
      Overrides:
      doStart in class BaseHolder<jakarta.servlet.ServletContainerInitializer>
      Throws:
      AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
      Exception - If there was a problem starting. Will cause a transition to FAILED state
    • fromString

      public static ServletContainerInitializerHolder fromString(ClassLoader loader, String string)
      Re-inflate a stringified ServletContainerInitializerHolder.
      Parameters:
      loader - the classloader to use to load the startup classes
      string - the stringified representation of the ServletContainerInitializerHolder
      Returns:
      a new ServletContainerInitializerHolder instance populated by the info in the string
    • toString

      public String toString()
      Overrides:
      toString in class AbstractLifeCycle