Class WebFragmentRegistrationBean
- java.lang.Object
-
- org.joinfaces.autoconfigure.servlet.WebFragmentRegistrationBean
-
- All Implemented Interfaces:
WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
public class WebFragmentRegistrationBean extends Object implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
RegistrationBean
forweb-fragment.xml
files.This is implemented as
WebServerFactoryCustomizer
so it only applies to embedded servlet-containers. When deployed as war file, the external servlet-container will find theweb-fragment.xml
file.The main feature of this class is the way it registers listeners. They will be treated as if they were declared in a
web-fragment.xml
and therefore aren't affected by the restrictions of Section 4.4 of the Servlet Specification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebFragmentRegistrationBean.JettyListenerAdder
ThisConfiguration
adds listeners to the servlet-context in a non-programmatic way, so they aren't affected by the restrictions for programmatically registered listeners of Section 4.4 of the Servlet Specification.static class
WebFragmentRegistrationBean.TomcatListenerAdder
ThisTomcatContextCustomizer
adds listeners to the servlet-context in a non-programmatic way, so they aren't affected by the restrictions for programmatically registered listeners of Section 4.4 of the Servlet Specification.static class
WebFragmentRegistrationBean.UndertowListenerAdder
ThisUndertowDeploymentInfoCustomizer
adds listeners to the servlet-context in a non-programmatic way, so they aren't affected by the restrictions for programmatically registered listeners of Section 4.4 of the Servlet Specification.
-
Constructor Summary
Constructors Constructor Description WebFragmentRegistrationBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
customize(ConfigurableServletWebServerFactory factory)
Map<String,String>
getContextParams()
List<ErrorPage>
getErrorPages()
List<Class<? extends EventListener>>
getListeners()
void
setContextParams(Map<String,String> contextParams)
void
setErrorPages(List<ErrorPage> errorPages)
void
setListeners(List<Class<? extends EventListener>> listeners)
-
-
-
Method Detail
-
customize
public void customize(ConfigurableServletWebServerFactory factory)
- Specified by:
customize
in interfaceWebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
-
getListeners
public List<Class<? extends EventListener>> getListeners()
-
setListeners
public void setListeners(List<Class<? extends EventListener>> listeners)
-
-