public class WebappLifecycleListener
extends java.lang.Object
implements javax.servlet.ServletRequestListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletRequestAttributeListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener
Central location for web application lifecycle events.
The main purpose of this class is detect when we
should be invoking methods marked with the
@PreDestroy annotation.
| Constructor and Description |
|---|
WebappLifecycleListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
attributeAdded(javax.servlet.http.HttpSessionBindingEvent se)
Notification that an attribute has been added to a session.
|
void |
attributeAdded(javax.servlet.ServletContextAttributeEvent scab)
Notification that a new attribute was added to the servlet context.
|
void |
attributeAdded(javax.servlet.ServletRequestAttributeEvent srae)
Notification that a new attribute was added to the
* servlet request.
|
void |
attributeRemoved(javax.servlet.http.HttpSessionBindingEvent event)
Notification that an attribute has been removed from a session.
|
void |
attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
Notification that an existing attribute has been removed from the servlet context.
|
void |
attributeRemoved(javax.servlet.ServletRequestAttributeEvent event)
Notification that an existing attribute has been removed from the
* servlet request.
|
void |
attributeReplaced(javax.servlet.http.HttpSessionBindingEvent event)
Notification that an attribute has been replaced in a session.
|
void |
attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
Notification that an attribute on the servlet context has been replaced.
|
void |
attributeReplaced(javax.servlet.ServletRequestAttributeEvent event)
Notification that an attribute was replaced on the
* servlet request.
|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Notification that the servlet context is about to be shut down.
|
void |
contextInitialized(javax.servlet.ServletContextEvent sce)
Notification that the web application initialization
process is starting.
|
void |
requestDestroyed(javax.servlet.ServletRequestEvent event)
The request is about to go out of scope of the web application.
|
void |
requestInitialized(javax.servlet.ServletRequestEvent sre)
The request is about to come into scope of the web application.
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent se)
Notification that a session was created.
|
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Notification that a session is about to be invalidated.
|
public void requestDestroyed(javax.servlet.ServletRequestEvent event)
requestDestroyed in interface javax.servlet.ServletRequestListenerpublic void requestInitialized(javax.servlet.ServletRequestEvent sre)
requestInitialized in interface javax.servlet.ServletRequestListenerpublic void sessionCreated(javax.servlet.http.HttpSessionEvent se)
sessionCreated in interface javax.servlet.http.HttpSessionListenerse - the notification eventpublic void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
sessionDestroyed in interface javax.servlet.http.HttpSessionListenerevent - the notification eventpublic void attributeAdded(javax.servlet.ServletRequestAttributeEvent srae)
attributeAdded in interface javax.servlet.ServletRequestAttributeListenerpublic void attributeRemoved(javax.servlet.ServletRequestAttributeEvent event)
attributeRemoved in interface javax.servlet.ServletRequestAttributeListenerpublic void attributeReplaced(javax.servlet.ServletRequestAttributeEvent event)
attributeReplaced in interface javax.servlet.ServletRequestAttributeListenerpublic void attributeAdded(javax.servlet.http.HttpSessionBindingEvent se)
attributeAdded in interface javax.servlet.http.HttpSessionAttributeListenerpublic void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent event)
attributeRemoved in interface javax.servlet.http.HttpSessionAttributeListenerpublic void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent event)
attributeReplaced in interface javax.servlet.http.HttpSessionAttributeListenerpublic void attributeAdded(javax.servlet.ServletContextAttributeEvent scab)
attributeAdded in interface javax.servlet.ServletContextAttributeListenerpublic void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
attributeRemoved in interface javax.servlet.ServletContextAttributeListenerpublic void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
attributeReplaced in interface javax.servlet.ServletContextAttributeListenerpublic void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized in interface javax.servlet.ServletContextListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed in interface javax.servlet.ServletContextListenerCopyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.