Package org.joinfaces.servlet
Class ServletContextListenerUtil
java.lang.Object
org.joinfaces.servlet.ServletContextListenerUtil
Helper class for Servlet Context Listeners.
The main feature of this class is the way it registers listeners. They will be treated as if they were declared in a non-programatic way and therefore aren't affected by the restrictions of Section 4.4 of the Servlet Specification.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
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
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
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. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addListeners
(org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory factory, Collection<Class<? extends EventListener>> listeners) Adds the given listener classes to the given Web server.
-
Method Details
-
addListeners
public static void addListeners(org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory factory, Collection<Class<? extends EventListener>> listeners) Adds the given listener classes to the given Web server.- Parameters:
factory
- The factory for the WebServer to add the listeners to.listeners
- The listeners to add.
-