Class MockHttpListener


  • @ThreadSafe
    public final class MockHttpListener
    extends Object
    This class globally holds the HTTP listeners (ServletContextListener , HttpSessionListener and ServletRequestListener) that are triggered in tests.
    Author:
    Philip Helger
    • Method Detail

      • removeAllDefaultListeners

        public static void removeAllDefaultListeners()
      • setCurrentToDefault

        public static void setCurrentToDefault()
      • removeAllListeners

        public static void removeAllListeners()
      • getAllServletContextListeners

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<jakarta.servlet.ServletContextListener> getAllServletContextListeners()
      • getAllHttpSessionListeners

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<jakarta.servlet.http.HttpSessionListener> getAllHttpSessionListeners()
      • getAllServletRequestListeners

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<jakarta.servlet.ServletRequestListener> getAllServletRequestListeners()