Class WsContextListener
- java.lang.Object
-
- org.apache.tomcat.websocket.server.WsContextListener
-
- All Implemented Interfaces:
java.util.EventListener
,ServletContextListener
public class WsContextListener extends java.lang.Object implements ServletContextListener
In normal usage, thisServletContextListener
does not need to be explicitly configured as theWsSci
performs all the necessary bootstrap and installs this listener in theServletContext
. If theWsSci
is disabled, this listener must be added manually to everyServletContext
that uses WebSocket to bootstrap theWsServerContainer
correctly.
-
-
Constructor Summary
Constructors Constructor Description WsContextListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(ServletContextEvent sce)
Notification that the servlet context is about to be shut down.void
contextInitialized(ServletContextEvent sce)
Notification that the web application initialization process is starting.
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(ServletContextEvent sce)
Description copied from interface:javax.servlet.ServletContextListener
Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized.- Specified by:
contextInitialized
in interfaceServletContextListener
- Parameters:
sce
- Information about the ServletContext that was initialized
-
contextDestroyed
public void contextDestroyed(ServletContextEvent sce)
Description copied from interface:javax.servlet.ServletContextListener
Notification that the servlet context is about to be shut down. All servlets and filters have been destroy()ed before any ServletContextListeners are notified of context destruction.- Specified by:
contextDestroyed
in interfaceServletContextListener
- Parameters:
sce
- Information about the ServletContext that was destroyed
-
-