Package com.vaadin.flow.server.startup
Interface ClassLoaderAwareServletContainerInitializer
-
- All Superinterfaces:
javax.servlet.ServletContainerInitializer
- All Known Subinterfaces:
VaadinServletContextStartupInitializer
- All Known Implementing Classes:
AnnotationValidator,DevModeStartupListener,ErrorNavigationTargetInitializer,LookupServletContainerInitializer,RouteRegistryInitializer,ServletVerifier,VaadinAppShellInitializer,WebComponentConfigurationRegistryInitializer,WebComponentExporterAwareValidator
public interface ClassLoaderAwareServletContainerInitializer extends javax.servlet.ServletContainerInitializerAllows to load the implementation class by one classloader but accepts classes inonStartup(Set, ServletContext)method loaded by another classloader.Workaround for https://github.com/vaadin/flow/issues/7805.
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidonStartup(Set<Class<?>> set, javax.servlet.ServletContext context)Overridden to use different classloaders if needed.voidprocess(Set<Class<?>> classSet, javax.servlet.ServletContext context)Implement this method instead ofonStartup(Set, ServletContext)to handle classes accessible by different classloaders.default booleanrequiresLookup()Whether this initializer requires lookup or not.
-
-
-
Method Detail
-
onStartup
default void onStartup(Set<Class<?>> set, javax.servlet.ServletContext context) throws javax.servlet.ServletException
Overridden to use different classloaders if needed.- Specified by:
onStartupin interfacejavax.servlet.ServletContainerInitializer- Throws:
javax.servlet.ServletException
-
requiresLookup
default boolean requiresLookup()
Whether this initializer requires lookup or not.- Returns:
- whether this initializer requires lookup
-
process
void process(Set<Class<?>> classSet, javax.servlet.ServletContext context) throws javax.servlet.ServletException
Implement this method instead ofonStartup(Set, ServletContext)to handle classes accessible by different classloaders.- Parameters:
classSet- the Set of application classes that extend, implement, or have been annotated with the class types specified by theHandlesTypesannotation, ornullif there are no matches, or thisServletContainerInitializerhas not been annotated withHandlesTypescontext- theServletContextof the web application that is being started and in which the classes contained inclassSetwere found- Throws:
javax.servlet.ServletException- if an error has occurred- See Also:
onStartup(Set, ServletContext)
-
-