public class EnhancedListener extends ForwardingServletListener
ServletContainerInitializer so that it's able to boot Weld before any application code is called, and thus injections
will succeed for all listeners, servlets, filters etc.
This listener MUST NOT be defined in web.xml because it registers itself during ServletContainerInitializer#onStartup(Set, ServletContext)
notification!
ServletRequest and HttpSession notifications are no-op in case of the Listener is registered as well.Listener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENHANCED_LISTENER_USED_ATTRIBUTE_NAME |
| Constructor and Description |
|---|
EnhancedListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(ServletContextEvent sce) |
void |
contextInitialized(ServletContextEvent sce) |
protected ServletListener |
delegate() |
void |
onStartup(java.util.Set<java.lang.Class<?>> classes,
ServletContext context) |
void |
requestDestroyed(ServletRequestEvent sre) |
void |
requestInitialized(ServletRequestEvent sre) |
void |
sessionCreated(HttpSessionEvent se) |
void |
sessionDestroyed(HttpSessionEvent se) |
public static final java.lang.String ENHANCED_LISTENER_USED_ATTRIBUTE_NAME
public void onStartup(java.util.Set<java.lang.Class<?>> classes,
ServletContext context)
throws ServletException
ServletExceptionpublic void contextInitialized(ServletContextEvent sce)
contextInitialized in class ForwardingServletListenerpublic void contextDestroyed(ServletContextEvent sce)
contextDestroyed in class ForwardingServletListenerpublic void requestDestroyed(ServletRequestEvent sre)
requestDestroyed in class ForwardingServletListenerpublic void requestInitialized(ServletRequestEvent sre)
requestInitialized in class ForwardingServletListenerpublic void sessionCreated(HttpSessionEvent se)
sessionCreated in class ForwardingServletListenerpublic void sessionDestroyed(HttpSessionEvent se)
sessionDestroyed in class ForwardingServletListenerprotected ServletListener delegate()
delegate in class ForwardingServletListenerCopyright © 2014. All Rights Reserved.