|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.wwm.context.servlet.WebContainerAppListener
public class WebContainerAppListener
Class to listen for servlet start/stop events, and session start/end events, and ensure that we make things available elsewhere. This class can be registered in web.xml to configure then servlet container to call here at the appropriate points.
| Constructor Summary | |
|---|---|
WebContainerAppListener()
|
|
| Method Summary | |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent arg0)
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
Anything need doing when registering |
static WebContainerAppListener |
getInstance()
|
static SessionContext |
getSessionContext(javax.servlet.http.HttpSession session)
Get our SessionContext for this session. |
void |
postRequest(javax.servlet.http.HttpServletRequest request)
|
void |
preRequest(ApplicationContext applicationContext,
javax.servlet.http.HttpServletRequest request)
Prior to the request, we need to pass our app context and session context data into our ThreadLocal based container, so that correct ones for this request can be retrieved during servicing of the request. |
void |
sessionCreated(javax.servlet.http.HttpSessionEvent event)
Things to do at beginning of a new session. |
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent arg0)
Do whatever needs doing at end of the session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebContainerAppListener()
| Method Detail |
|---|
public static WebContainerAppListener getInstance()
public void contextInitialized(javax.servlet.ServletContextEvent event)
contextInitialized in interface javax.servlet.ServletContextListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent arg0)
contextDestroyed in interface javax.servlet.ServletContextListenerpublic void sessionCreated(javax.servlet.http.HttpSessionEvent event)
sessionCreated in interface javax.servlet.http.HttpSessionListenerpublic void sessionDestroyed(javax.servlet.http.HttpSessionEvent arg0)
sessionDestroyed in interface javax.servlet.http.HttpSessionListener
public void preRequest(ApplicationContext applicationContext,
javax.servlet.http.HttpServletRequest request)
applicationContext - - supplied from external singleton bean, so we don't needrequest - public static SessionContext getSessionContext(javax.servlet.http.HttpSession session)
session -
public void postRequest(javax.servlet.http.HttpServletRequest request)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||