public class LookupServletContainerInitializer extends Object implements ClassLoaderAwareServletContainerInitializer
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
LookupServletContainerInitializer() |
Modifier and Type | Method and Description |
---|---|
protected Collection<Class<?>> |
getServiceTypes()
Gets the service types that are used to set services into the
Lookup based on found subtypes by the
ServletContainerInitializer . |
void |
process(Set<Class<?>> classSet,
ServletContext servletContext)
Implement this method instead of
ClassLoaderAwareServletContainerInitializer.onStartup(Set, ServletContext)
to handle classes accessible by different classloaders. |
boolean |
requiresLookup()
Whether this initializer requires lookup or not.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onStartup
public void process(Set<Class<?>> classSet, ServletContext servletContext) throws ServletException
ClassLoaderAwareServletContainerInitializer
ClassLoaderAwareServletContainerInitializer.onStartup(Set, ServletContext)
to handle classes accessible by different classloaders.process
in interface ClassLoaderAwareServletContainerInitializer
classSet
- the Set of application classes that extend, implement, or have
been annotated with the class types specified by the
HandlesTypes
annotation, or null if there are no matches, or this
ServletContainerInitializer has not been annotated
with HandlesTypesservletContext
- the ServletContext of the web application that is
being started and in which the classes contained in c
were foundServletException
- if an error has occurredClassLoaderAwareServletContainerInitializer.onStartup(Set, ServletContext)
public boolean requiresLookup()
ClassLoaderAwareServletContainerInitializer
requiresLookup
in interface ClassLoaderAwareServletContainerInitializer
protected Collection<Class<?>> getServiceTypes()
Lookup
based on found subtypes by the
ServletContainerInitializer
.
LookupServletContainerInitializer
uses
ServletContainerInitializer
classes discovering mechanism based
on HandlesTypes
annotation. The method may be overridden to
return the service types which should be put into the Lookup
instance if another mechanism of class searching is used (e.g. Spring
boot case).
The set of classes (passed into the process(Set, ServletContext)
method) will be filtered via checking whether they are assignable to the
service types and the resulting classes will be instantiated via
reflection.
LookupInitializer.initialize(VaadinContext, Map,
VaadinApplicationInitializationBootstrap)
Copyright © 2025. All rights reserved.