Package io.undertow.servlet.core
Class ApplicationListeners
java.lang.Object
io.undertow.servlet.core.ApplicationListeners
- All Implemented Interfaces:
Lifecycle
Class that is responsible for invoking application listeners.
This class does not perform any context setup, the context must be setup before invoking this class.
Note that arrays are used instead of lists for performance reasons.
- Author:
- Stuart Douglas
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionApplicationListeners(List<ManagedListener> allListeners, jakarta.servlet.ServletContext servletContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ManagedListener listener) voidvoidvoidhttpSessionAttributeAdded(jakarta.servlet.http.HttpSession session, String name, Object value) voidhttpSessionAttributeRemoved(jakarta.servlet.http.HttpSession session, String name, Object value) voidhttpSessionAttributeReplaced(jakarta.servlet.http.HttpSession session, String name, Object value) voidhttpSessionIdChanged(jakarta.servlet.http.HttpSession session, String oldSessionId) static booleanisListenerClass(Class<?> clazz) booleanreturns true if this is in in avoidrequestDestroyed(jakarta.servlet.ServletRequest request) voidrequestInitialized(jakarta.servlet.ServletRequest request) voidservletContextAttributeAdded(String name, Object value) voidservletContextAttributeRemoved(String name, Object value) voidservletContextAttributeReplaced(String name, Object value) voidservletRequestAttributeAdded(jakarta.servlet.http.HttpServletRequest request, String name, Object value) voidservletRequestAttributeRemoved(jakarta.servlet.http.HttpServletRequest request, String name, Object value) voidservletRequestAttributeReplaced(jakarta.servlet.http.HttpServletRequest request, String name, Object value) voidsessionCreated(jakarta.servlet.http.HttpSession session) voidsessionDestroyed(jakarta.servlet.http.HttpSession session) voidstart()voidstop()
-
Constructor Details
-
ApplicationListeners
public ApplicationListeners(List<ManagedListener> allListeners, jakarta.servlet.ServletContext servletContext)
-
-
Method Details
-
addListener
-
start
public void start() throws jakarta.servlet.ServletException -
stop
public void stop() -
isStarted
public boolean isStarted() -
contextInitialized
public void contextInitialized() -
contextDestroyed
public void contextDestroyed() -
servletContextAttributeAdded
-
servletContextAttributeRemoved
-
servletContextAttributeReplaced
-
requestInitialized
public void requestInitialized(jakarta.servlet.ServletRequest request) -
requestDestroyed
public void requestDestroyed(jakarta.servlet.ServletRequest request) -
servletRequestAttributeAdded
-
servletRequestAttributeRemoved
-
servletRequestAttributeReplaced
-
sessionCreated
public void sessionCreated(jakarta.servlet.http.HttpSession session) -
sessionDestroyed
public void sessionDestroyed(jakarta.servlet.http.HttpSession session) -
httpSessionAttributeAdded
-
httpSessionAttributeRemoved
-
httpSessionAttributeReplaced
-
httpSessionIdChanged
-
listenerState
returns true if this is in in a -
isListenerClass
- Parameters:
clazz- The potential listener class- Returns:
- true if the provided class is a valid listener class
-