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
- Direct Known Subclasses:
AnnotationConfiguration.DiscoveredServletContainerInitializerHolder
public class ServletContainerInitializerHolder
extends BaseHolder<jakarta.servlet.ServletContainerInitializer>
Holds a ServletContainerInitializer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExperimental Wrapper mechanism for ServletContainerInitializer objects.static classNested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionServletContainerInitializerHolder(jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses) ServletContainerInitializerHolder(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass) ServletContainerInitializerHolder(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass, Class<?>... startupClasses) protectedServletContainerInitializerHolder(Source source, jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStartupClasses(Class<?>... clazzes) Add classes that should be passed to the SCI onStartup method.voidaddStartupClasses(String... names) Add the names of classes which should be passed to the SCI onStartup method.voiddoStart()Method to override to start the lifecyclefromString(ClassLoader loader, String string) Re-inflate a stringified ServletContainerInitializerHolder.toString()Methods inherited from class BaseHolder
createInstance, doStop, dump, dump, getClassName, getHeldClass, getInstance, getServletContext, getServletContextHandler, getServletHandler, getSource, illegalStateIfContextStarted, initialize, isInstance, setClassName, setHeldClass, setInstance, setServletHandler, unwrap, wrapMethods inherited from class AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop
-
Field Details
-
_startupClassNames
-
_startupClasses
-
__pattern
-
-
Constructor Details
-
ServletContainerInitializerHolder
-
ServletContainerInitializerHolder
public ServletContainerInitializerHolder() -
ServletContainerInitializerHolder
public ServletContainerInitializerHolder(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass) -
ServletContainerInitializerHolder
-
ServletContainerInitializerHolder
public ServletContainerInitializerHolder(jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses) -
ServletContainerInitializerHolder
-
-
Method Details
-
addStartupClasses
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
Add classes that should be passed to the SCI onStartup method.- Parameters:
clazzes- classes that should be passed to the SCI onStartup method
-
resolveStartupClasses
-
doStart
Description copied from class:AbstractLifeCycleMethod to override to start the lifecycle- Overrides:
doStartin classBaseHolder<jakarta.servlet.ServletContainerInitializer>- Throws:
Exception- If there was a problem starting. Will cause a transition to FAILED state
-
fromString
Re-inflate a stringified ServletContainerInitializerHolder.- Parameters:
loader- the classloader to use to load the startup classesstring- the stringified representation of the ServletContainerInitializerHolder- Returns:
- a new ServletContainerInitializerHolder instance populated by the info in the string
-
toString
- Overrides:
toStringin classAbstractLifeCycle
-