Package cloud.piranha.cdi.weld
Class WeldInitListener
- java.lang.Object
-
- org.jboss.weld.servlet.api.helpers.ForwardingServletListener
-
- cloud.piranha.cdi.weld.WeldInitListener
-
- All Implemented Interfaces:
EventListener
,HttpSessionListener
,ServletContextListener
,ServletRequestListener
,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 theHttpServletRequest
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 Summary
Constructors Constructor Description WeldInitListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextInitialized(ServletContextEvent sce)
Handle the context initialized event.org.jboss.weld.servlet.api.ServletListener
delegate()
void
requestInitialized(ServletRequestEvent sre)
Handle the request initialized event.
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(ServletContextEvent sce)
Description copied from interface:ServletContextListener
Handle the context initialized event.- Specified by:
contextInitialized
in interfaceServletContextListener
- Overrides:
contextInitialized
in classorg.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 interfaceServletRequestListener
- Overrides:
requestInitialized
in classorg.jboss.weld.servlet.api.helpers.ForwardingServletListener
- Parameters:
sre
- the event.
-
delegate
public org.jboss.weld.servlet.api.ServletListener delegate()
- Specified by:
delegate
in classorg.jboss.weld.servlet.api.helpers.ForwardingServletListener
-
-