Class WeldInitListener

java.lang.Object
org.jboss.weld.servlet.api.helpers.ForwardingServletListener
cloud.piranha.cdi.weld.WeldInitListener
All Implemented Interfaces:
HttpSessionListener, ServletContextListener, ServletRequestListener, EventListener, org.jboss.weld.servlet.api.ServletListener

public class WeldInitListener extends org.jboss.weld.servlet.api.helpers.ForwardingServletListener
This Piranha specific Weld initializer forwards all initialization to the original Weld initializer, but modifies the HttpServletRequest that's passed into it.

The purpose of this is making sure Weld is able to access the current HttpServletRequest as that changes throughout the request processing pipeline.

Author:
Arjan Tijms
See Also:
WeldHttpServletRequest, CurrentRequestHolder
  • Constructor Details

    • WeldInitListener

      public WeldInitListener()
  • Method Details

    • contextInitialized

      public void contextInitialized(ServletContextEvent sce)
      Description copied from interface: ServletContextListener
      Handle the context initialized event.
      Specified by:
      contextInitialized in interface ServletContextListener
      Overrides:
      contextInitialized in class org.jboss.weld.servlet.api.helpers.ForwardingServletListener
      Parameters:
      sce - the event.
    • requestInitialized

      public void requestInitialized(ServletRequestEvent sre)
      Description copied from interface: ServletRequestListener
      Handle the request initialized event.
      Specified by:
      requestInitialized in interface ServletRequestListener
      Overrides:
      requestInitialized in class org.jboss.weld.servlet.api.helpers.ForwardingServletListener
      Parameters:
      sre - the event.
    • delegate

      public org.jboss.weld.servlet.api.ServletListener delegate()
      Specified by:
      delegate in class org.jboss.weld.servlet.api.helpers.ForwardingServletListener