Package edu.wisc.game.threads

## Class AppContextListener

- java.lang.Object
- - edu.wisc.game.threads.AppContextListener

- All Implemented Interfaces:
    `jakarta.servlet.ServletContextListener`, `EventListener`

      @WebListener
      public class AppContextListener
      extends Object
      implements jakarta.servlet.ServletContextListener

  This listener is used so that we can safely stop the MaintenanceThread when the web app is undeployed.

  We can put an entry in web.xml for this listener, but we don't actually do, because the @WebListener annotation does the trick.

  For some examples of using context listeners, see e.g. https://www.digitalocean.com/community/tutorials/servletcontextlistener-servlet-listener-example

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AppContextListener()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `contextDestroyed​(jakarta.servlet.ServletContextEvent servletContextEvent)` |
    `void` | `contextInitialized​(jakarta.servlet.ServletContextEvent servletContextEvent)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AppContextListener

          public AppContextListener()

  - ### Method Detail

    - #### contextInitialized

          public void contextInitialized​(jakarta.servlet.ServletContextEvent servletContextEvent)

      Specified by:
        `contextInitialized` in interface `jakarta.servlet.ServletContextListener`

    - #### contextDestroyed

          public void contextDestroyed​(jakarta.servlet.ServletContextEvent servletContextEvent)

      Specified by:
        `contextDestroyed` in interface `jakarta.servlet.ServletContextListener`