Class CacheContextListener

  • All Implemented Interfaces:
    jakarta.servlet.ServletContextListener, EventListener

    public class CacheContextListener
    extends Object
    implements jakarta.servlet.ServletContextListener
    CacheContextListener implements the ServletContextListener interface in order to be notified when the context is created and destroyed. It is used to create the cache and add it as a context attribute.
    • Constructor Detail

      • CacheContextListener

        public CacheContextListener()
        Public constructor taking no arguments according to servlet spec
    • Method Detail

      • contextInitialized

        public void contextInitialized​(jakarta.servlet.ServletContextEvent sce)
        This is called when the context is created.
        Specified by:
        contextInitialized in interface jakarta.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(jakarta.servlet.ServletContextEvent sce)
        This is called when the context is shutdown.
        Specified by:
        contextDestroyed in interface jakarta.servlet.ServletContextListener