Package org.eclipse.jetty.ee10.servlet
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
Modifier and TypeClassDescriptionstatic interface
Experimental Wrapper mechanism for ServletContainerInitializer objects.static class
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionServletContainerInitializerHolder
(jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses) ServletContainerInitializerHolder
(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass) ServletContainerInitializerHolder
(Class<? extends jakarta.servlet.ServletContainerInitializer> sciClass, Class<?>... startupClasses) protected
ServletContainerInitializerHolder
(Source source, jakarta.servlet.ServletContainerInitializer sci, Class<?>... startupClasses) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStartupClasses
(Class<?>... clazzes) Add classes that should be passed to the SCI onStartup method.void
addStartupClasses
(String... names) Add the names of classes which should be passed to the SCI onStartup method.void
doStart()
Method to override to start the lifecyclefromString
(ClassLoader loader, String string) Re-inflate a stringified ServletContainerInitializerHolder.toString()
Methods inherited from class org.eclipse.jetty.ee10.servlet.BaseHolder
createInstance, doStop, dump, dump, getClassName, getHeldClass, getInstance, getServletContext, getServletContextHandler, getServletHandler, getSource, illegalStateIfContextStarted, initialize, isInstance, setClassName, setHeldClass, setInstance, setServletHandler, unwrap, wrap
Methods inherited from class org.eclipse.jetty.util.component.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
- Throws:
Exception
-
doStart
Description copied from class:AbstractLifeCycle
Method to override to start the lifecycle- Overrides:
doStart
in classBaseHolder<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
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:
toString
in classAbstractLifeCycle
-