Class ServletContainerInitializerHolder

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

public class ServletContainerInitializerHolder extends BaseHolder<javax.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 javax.servlet.ServletContainerInitializer> sciClass)
    • ServletContainerInitializerHolder

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

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

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

    • addStartupClasses

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

      public void addStartupClasses(Class<?>... clazzes)
      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<javax.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